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

[enh] Optimization + fix typos + add comments

This commit is contained in:
Gofannon 2018-06-27 19:23:33 +02:00
parent 83aac4438b
commit 5716fb1686

View file

@ -124,18 +124,24 @@ ynh_replace_string "__YNH_ADMIN_USER__" "$admin" "../conf/local.php"
# Copy Yunohost specific configuration
cp ../conf/local.php $final_path/conf
# Do not override ACL configuration file
# Do not overwrite existing ACL configuration file as it could have user customization's and settings.
# Create file if it does not exist
# See https://www.dokuwiki.org/acl#background_info
if [ ! -f "$final_path/conf/acl.auth.php" ]; then
cp ../conf/acl.auth.php $final_path/conf
fi
# Remove upgrade notification
# Remove upgrade notification inside Dokuwiki's admin panel
# See https://www.dokuwiki.org/update_check
touch $final_path/doku.php
# Remove files not used anymore after upgrade
# 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
@ -145,11 +151,7 @@ if [ -f "$final_path/data/deleted.files" ]; then
# That one works as expected
grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -fr
# bash "hack" to move back to the location user was before the last cd made
# See http://winterdrake.com/unixlinux-trick-cd-back-to-the-previous-directory/
# Should be the script folder of the package
cd -
)
fi
# Update all plugins