From ef32510a4340797db3aadcd7d8270921656d0737 Mon Sep 17 00:00:00 2001 From: opi Date: Mon, 25 Jan 2016 13:58:36 +0100 Subject: [PATCH] [enh] Remove deleted files. --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 1595146..ab9b3ee 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,6 +29,10 @@ sudo cp ../conf/acl.auth.php $final_path/conf # See https://www.dokuwiki.org/update_check sudo touch $final_path/doku.php +# Remove deleted files +# See https://www.dokuwiki.org/install:unused_files +grep -Ev '^($|#)' ../sources/data/deleted.files | xargs -I {} sudo rm -vrf $final_path/{} + # Files owned by root, www-data can just read sudo find $final_path -type f | xargs sudo chmod 0644 sudo find $final_path -type d | xargs sudo chmod 755