2015-10-28 14:13:57 +01:00
|
|
|
exit_msg() { echo "\033[31m$1\033[0m"; exit 1; }
|
|
|
|
|
|
|
|
CRYPT_SALT=$(cat "$BASEDIR/salt")
|
|
|
|
CRYPT_PASS="$GITCRYPT_PASS"
|
|
|
|
|
|
|
|
[ -z "$CRYPT_SALT" ] && exit_msg "Salt not found"
|
|
|
|
|
|
|
|
if [ -z "$CRYPT_PASS" ]; then
|
2015-10-30 14:33:02 +01:00
|
|
|
CRYPT_PASS="$(cat "$BASEDIR/../.git/pass")"
|
2015-10-28 14:13:57 +01:00
|
|
|
[ -z "$CRYPT_PASS" ] && exit_msg "Pass not found"
|
|
|
|
fi
|