mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-06 11:36:04 +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
|
errors=true
|
||||||
else
|
else
|
||||||
if [ -f "${restic_filename}.bz2" ]; then
|
if [ -f "${restic_filename}.bz2" ]; then
|
||||||
bzip2 -d "${restic_filename}.bz2"
|
bzip2 -d "${restic_filename}.bz2" && chmod +x "${restic_filename}"
|
||||||
chmod +x "${restic_filename}"
|
|
||||||
elif [ -f "${restic_filename}.zip" ]; then
|
elif [ -f "${restic_filename}.zip" ]; then
|
||||||
unzip "${restic_filename}.zip"
|
unzip "${restic_filename}.zip"
|
||||||
else
|
else
|
||||||
echo "Archive ${restic_filename} not found"
|
echo "Archive ${restic_filename} not found"
|
||||||
errors=true
|
errors=true
|
||||||
fi
|
fi
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to decompress ${restic_filename}.bz2"
|
echo "Failed to decompress ${restic_filename}.bz2"
|
||||||
errors=true
|
errors=true
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue