1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dokuwiki_ynh.git synced 2024-09-03 18:26:20 +02:00

[enh] Simplify by removing subprocess + add comment

This commit is contained in:
Gofannon 2020-08-25 23:36:47 +02:00
parent fac3df2025
commit 1332c38656

View file

@ -230,12 +230,9 @@ then
# See https://www.dokuwiki.org/install:unused_files # See https://www.dokuwiki.org/install:unused_files
if [ -f "$final_path/data/deleted.files" ]; then if [ -f "$final_path/data/deleted.files" ]; then
# Use a "sub process" to start a new shell to run these commands # Feed output of grep[...] line by line to 'ynh_secure_remove'
# Allow to use only one "cd" and to be more efficent # 'ynh_secure_remove' can only work file by file. Cannot work with a list
( # This is a (complicated) workaround this limitation
# Move to the dokuwiki installation folder so the "official" commands can be used without adaptation
cd $final_path
while IFS= read -r line; do while IFS= read -r line; do
# Added this test to reduce the spam printed by helper to the user in the webadmin. # Added this test to reduce the spam printed by helper to the user in the webadmin.
@ -269,9 +266,6 @@ then
###grep --null --extended-regexp --invert-match '^($|#)' data/deleted.files > toto.list ###grep --null --extended-regexp --invert-match '^($|#)' data/deleted.files > toto.list
###xargs --null --verbose --max-args=1 --arg-file=toto.list ynh_secure_remove 2>&1 ###xargs --null --verbose --max-args=1 --arg-file=toto.list ynh_secure_remove 2>&1
)
fi fi
# TODO Taken from old "upgrade" script. Should check if it is needed and what it does # TODO Taken from old "upgrade" script. Should check if it is needed and what it does