mirror of
https://github.com/YunoHost-Apps/fluffychat_ynh.git
synced 2024-09-03 18:36:04 +02:00
remove potential trailing slash to avoid double slashes
This commit is contained in:
parent
01b800d43c
commit
0cdfaf46b8
3 changed files with 9 additions and 3 deletions
|
@ -20,7 +20,9 @@ ynh_change_url_nginx_config
|
|||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="<base href=".*">" --replace_string="<base href=\"$path/\">" --target_file="$install_dir/index.html"
|
||||
# remove potential trailing slash to avoid double slashes
|
||||
path_without_trailing_slash=${path%/}
|
||||
ynh_replace_string --match_string="<base href=".*">" --replace_string="<base href=\"$path_without_trailing_slash/\">" --target_file="$install_dir/index.html"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -19,7 +19,9 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
|||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
ynh_replace_string --match_string="<base href=".*">" --replace_string="<base href=\"$path/\">" --target_file="$install_dir/index.html"
|
||||
# remove potential trailing slash to avoid double slashes
|
||||
path_without_trailing_slash=${path%/}
|
||||
ynh_replace_string --match_string="<base href=".*">" --replace_string="<base href=\"$path_without_trailing_slash/\">" --target_file="$install_dir/index.html"
|
||||
|
||||
chown -R "www-data:www-data" "$install_dir"
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@ then
|
|||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
ynh_replace_string --match_string="<base href=".*">" --replace_string="<base href=\"$path/\">" --target_file="$install_dir/index.html"
|
||||
# remove potential trailing slash to avoid double slashes
|
||||
path_without_trailing_slash=${path%/}
|
||||
ynh_replace_string --match_string="<base href=".*">" --replace_string="<base href=\"$path_without_trailing_slash/\">" --target_file="$install_dir/index.html"
|
||||
fi
|
||||
|
||||
chown -R "www-data:www-data" "$install_dir"
|
||||
|
|
Loading…
Reference in a new issue