mirror of
https://github.com/netinvent/npbackup.git
synced 2024-11-10 17:15:28 +08:00
Run chmod only on succesful updates
This commit is contained in:
parent
608b4f1eda
commit
a9658bbfb1
1 changed files with 2 additions and 3 deletions
|
@ -26,15 +26,14 @@ for platform in "windows_386" "windows_amd64" "linux_arm" "linux_arm64" "linux_a
|
|||
errors=true
|
||||
else
|
||||
if [ -f "${restic_filename}.bz2" ]; then
|
||||
bzip2 -d "${restic_filename}.bz2"
|
||||
chmod +x "${restic_filename}"
|
||||
bzip2 -d "${restic_filename}.bz2" && chmod +x "${restic_filename}"
|
||||
elif [ -f "${restic_filename}.zip" ]; then
|
||||
unzip "${restic_filename}.zip"
|
||||
else
|
||||
echo "Archive ${restic_filename} not found"
|
||||
errors=true
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to decompress ${restic_filename}.bz2"
|
||||
errors=true
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue