mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-07 05:03:34 +00:00
make decrypt.sh more verbose
This commit is contained in:
13
.github/actions/decrypt.sh
vendored
13
.github/actions/decrypt.sh
vendored
@ -1,11 +1,21 @@
|
||||
#!/bin/sh
|
||||
credspath="${HOME}/.gam"
|
||||
if [ ! -d "$credspath" ]; then
|
||||
echo "creating ${credspath}"
|
||||
mkdir -p "$credspath"
|
||||
fi
|
||||
gpgfile="$1"
|
||||
if [ -f "$gpgfile" ]; then
|
||||
echo "source file is ${gpgfile}"
|
||||
else
|
||||
echo "ERROR: ${gpgfile} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
credsfile="$2"
|
||||
echo "target file is ${credsfile}"
|
||||
if [ -z ${PASSCODE+x} ]; then
|
||||
echo "PASSCODE is unset";
|
||||
echo "ERROR: PASSCODE is unset";
|
||||
exit 2
|
||||
else
|
||||
echo "PASSCODE is set";
|
||||
fi
|
||||
@ -13,7 +23,6 @@ fi
|
||||
gpg --quiet --batch --yes --decrypt --passphrase="${PASSCODE}" \
|
||||
--output "${credsfile}" "${gpgfile}"
|
||||
|
||||
mkdir -p "${credspath}"
|
||||
tar xvvf "${credsfile}" --directory "${credspath}"
|
||||
rm -rvf "${gpgfile}"
|
||||
rm -rvf "${credsfile}"
|
||||
|
Reference in New Issue
Block a user