From a4ab3c7bc91d215799fecffae454928f576e2429 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sat, 18 Oct 2014 15:42:49 -0400 Subject: [PATCH] Script to distribute C packages. --- .gitignore | 1 + MasterPassword/C/distribute | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 MasterPassword/C/distribute diff --git a/.gitignore b/.gitignore index 546e522d..fb03d1bd 100644 --- a/.gitignore +++ b/.gitignore @@ -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/*/* diff --git a/MasterPassword/C/distribute b/MasterPassword/C/distribute new file mode 100755 index 00000000..614ad02a --- /dev/null +++ b/MasterPassword/C/distribute @@ -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"