2
0

Script to distribute C packages.

This commit is contained in:
Maarten Billemont 2014-10-18 15:42:49 -04:00
parent 039547b735
commit a4ab3c7bc9
2 changed files with 16 additions and 0 deletions

1
.gitignore vendored
View File

@ -33,6 +33,7 @@ MasterPassword/Java/**/target
# C
MasterPassword/C/*.o
MasterPassword/C/mpw-*.tar.gz
MasterPassword/C/mpw
MasterPassword/C/mpw-bench
MasterPassword/C/lib/*/*

15
MasterPassword/C/distribute Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
cd "${BASH_SOURCE%/*}"
mpwArchive=mpw-$(git describe --tags --long --dirty).tar.gz
[[ -e $mpwArchive ]] && echo "WARNING: $mpwArchive already exists. Will overwrite."
read -n1 -p "Will prepare and release $mpwArchive. Press a key to continue or ^C to abort."
git ls-files -z . | xargs -0 tar -cvzf "$mpwArchive"
echo "$mpwArchive ready, SHA256: $(openssl sha -sha256 < "$mpwArchive")"
cd ../../Site/current
ln -sf "../../MasterPassword/C/$mpwArchive"
[[ -e $_ ]]
echo "Linked from site, please update your hyperlinks to point to http://masterpasswordapp.com/$mpwArchive"