Update decrypt.sh

This commit is contained in:
Jay Lee 2025-04-18 11:45:39 -04:00 committed by GitHub
parent c866d2f4ab
commit 7f72dad9b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,5 +4,16 @@ if [ ! -d "$credspath" ]; then
echo "creating ${credspath}"
mkdir -p "$credspath"
fi
echo -e "$oa2" > "${credspath}/oauth2.txt"
credsfile="${credspath}/oauth2.txt"
echo "$oa2" > "$credsfile"
echo "File size:"
wc -c "$credsfile"
echo "File type:"
file "$credsfile"
echo "Validation:"
jq -e . "$credsfile" > /dev/null
if [ $? -eq 0 ]; then
echo "Valid JSON"
else
echo "Invalid JSON"
fi