termux-tools: termux-restore: ensure that files/dirs have modes rw/rwx respectively
Some utilities (e.g. proot-distro) may produce read-only files in $PREFIX which will make use of termux-restore impossible.
This commit is contained in:
parent
88be9114b1
commit
dd65d4e50a
@ -57,6 +57,10 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure that prefix doesn't contain read-only files.
|
||||
find "@TERMUX_PREFIX@" -type d -print0 | xargs -0 -r chmod u+rwx
|
||||
find "@TERMUX_PREFIX@" -type f -print0 | xargs -0 -r chmod u+rw
|
||||
|
||||
# --recursive-unlink is added intentionally to delete all orphan/extra files
|
||||
# in $PREFIX. It must be restored to a clean state as in backup tarball.
|
||||
tar -x -C "@TERMUX_BASE_DIR@" -f "$BACKUP_FILE_PATH" \
|
||||
|
Loading…
Reference in New Issue
Block a user