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:
parent
fac3df2025
commit
1332c38656
1 changed files with 35 additions and 41 deletions
|
@ -230,12 +230,9 @@ then
|
|||
# See https://www.dokuwiki.org/install:unused_files
|
||||
if [ -f "$final_path/data/deleted.files" ]; then
|
||||
|
||||
# Use a "sub process" to start a new shell to run these commands
|
||||
# Allow to use only one "cd" and to be more efficent
|
||||
(
|
||||
# Move to the dokuwiki installation folder so the "official" commands can be used without adaptation
|
||||
cd $final_path
|
||||
|
||||
# Feed output of grep[...] line by line to 'ynh_secure_remove'
|
||||
# 'ynh_secure_remove' can only work file by file. Cannot work with a list
|
||||
# This is a (complicated) workaround this limitation
|
||||
while IFS= read -r line; do
|
||||
|
||||
# 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
|
||||
###xargs --null --verbose --max-args=1 --arg-file=toto.list ynh_secure_remove 2>&1
|
||||
|
||||
|
||||
)
|
||||
fi
|
||||
|
||||
# TODO Taken from old "upgrade" script. Should check if it is needed and what it does
|
||||
|
|
Loading…
Add table
Reference in a new issue