From dc6168a0e305ccceb9c8958ee1242ae923dba8c3 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 12 Feb 2019 19:53:33 +0100 Subject: [PATCH] Do not use rm -rf ! --- scripts/upgrade | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index fd72d31..2e1cd5a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -196,12 +196,7 @@ if [ -f "$final_path/data/deleted.files" ]; then # Move to the dokuwiki installation folder so the "official" commands can be used without adaptation cd $final_path - # This command could not remove directory - #grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -vf - # => "rm: cannot remove 'vendor/easybook/geshi': Is a directory" - - # That one works as expected - grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -fr + grep --extended-regexp --invert-match '^($|#)' data/deleted.files | xargs --max-args=1 rm --force --dir || true ) fi