fix destore
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
destore() {
|
||||
for dst in "$@"; do
|
||||
local MAYBESUDO=""
|
||||
if test ! -w "$(realpath --no-symlinks $dst)" \
|
||||
|| test ! -w "$(basename "$(realpath --no-symlinks $dst)")"; then
|
||||
if test ! -w "$(dirname $(realpath --no-symlinks $dst))" ; then
|
||||
MAYBESUDO="sudo"
|
||||
sudo true || {
|
||||
>&2 echo "ERROR: could not destore '$dst' due to lack of sudo"
|
||||
|
||||
Reference in New Issue
Block a user