Fisxed bug related to verbose mode
All checks were successful
backup.sh / bash (push) Successful in 29s
All checks were successful
backup.sh / bash (push) Successful in 29s
This commit is contained in:
parent
c227a2f6d7
commit
3cf83b7db5
@ -121,6 +121,10 @@ make_backup() {
|
|||||||
for file in "$BACKUP_SH_SUBDIR"/**/*; do
|
for file in "$BACKUP_SH_SUBDIR"/**/*; do
|
||||||
# Skip symbol links and directories
|
# Skip symbol links and directories
|
||||||
[ -d "$file" ] || [ -L "$file" ] && continue
|
[ -d "$file" ] || [ -L "$file" ] && continue
|
||||||
|
|
||||||
|
if [ "$BACKUP_SH_VERBOSE" -eq 1 ]; then
|
||||||
|
printf "Computing checksum for '%s'...\n" "$file"
|
||||||
|
fi
|
||||||
gethash "$file" >> "$BACKUP_SH_CHECKSUM_FILE"
|
gethash "$file" >> "$BACKUP_SH_CHECKSUM_FILE"
|
||||||
done
|
done
|
||||||
shopt -u globstar dotglob
|
shopt -u globstar dotglob
|
||||||
@ -176,6 +180,7 @@ extract_backup() {
|
|||||||
BACKUP_SH_VERBOSE="$4"
|
BACKUP_SH_VERBOSE="$4"
|
||||||
|
|
||||||
# Decrypt the archive
|
# Decrypt the archive
|
||||||
|
echo "Decrypting backup..."
|
||||||
gpg -a \
|
gpg -a \
|
||||||
--quiet \
|
--quiet \
|
||||||
--decrypt \
|
--decrypt \
|
||||||
@ -206,7 +211,9 @@ extract_backup() {
|
|||||||
printf "[FATAL] - integrity error for '%s'.\n" "$file"
|
printf "[FATAL] - integrity error for '%s'.\n" "$file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
printf "[OK] - integrity check for '%s' passed.\n" "$file"
|
if [ "$BACKUP_SH_VERBOSE" -eq 1 ]; then
|
||||||
|
printf "[OK] - integrity check for '%s' passed.\n" "$file"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
shopt -u globstar dotglob
|
shopt -u globstar dotglob
|
||||||
fi
|
fi
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user