1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

fix basic shellcheck warnings (doublequotes)

This commit is contained in:
Jean-Baptiste Holcroft 2019-02-17 22:41:58 +01:00
parent 43bacab543
commit 923906e9d2
3 changed files with 23 additions and 23 deletions

View file

@ -105,7 +105,7 @@ chown -R "$app": "$final_path"
#================================================= #=================================================
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq "1" ] if [ "$is_public" -eq "1" ]
then then
# unprotected_uris allows SSO credentials to be passed anyway. # unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set "$app" unprotected_uris "/" ynh_app_setting_set "$app" unprotected_uris "/"

View file

@ -27,17 +27,17 @@ ynh_abort_if_errors
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get "$app" domain)
path_url=$(ynh_app_setting_get $app path) path_url=$(ynh_app_setting_get "$app" path)
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get "$app" final_path)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED
#================================================= #=================================================
ynh_webpath_available $domain $path_url \ ynh_webpath_available "$domain" "$path_url" \
|| ynh_die "Path not available: ${domain}${path_url}" || ynh_die "Path not available: ${domain}${path_url}"
test ! -d $final_path \ test ! -d "$final_path" \
|| ynh_die "There is already a directory: $final_path " || ynh_die "There is already a directory: $final_path "

View file

@ -15,12 +15,12 @@ source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get "$app" domain)
path_url=$(ynh_app_setting_get $app path) path_url=$(ynh_app_setting_get "$app" path)
admin=$(ynh_app_setting_get $app admin) admin=$(ynh_app_setting_get "$app" admin)
is_public=$(ynh_app_setting_get $app is_public) is_public=$(ynh_app_setting_get "$app" is_public)
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get "$app" final_path)
language=$(ynh_app_setting_get $app language) language=$(ynh_app_setting_get "$app" language)
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
@ -28,23 +28,23 @@ language=$(ynh_app_setting_get $app language)
# Fix is_public as a boolean value # Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set $app is_public 1 ynh_app_setting_set "$app" is_public 1
is_public=1 is_public=1
elif [ "$is_public" = "No" ]; then elif [ "$is_public" = "No" ]; then
ynh_app_setting_set $app is_public 0 ynh_app_setting_set "$app" is_public 0
is_public=0 is_public=0
fi fi
# If db_name doesn't exist, create it # If db_name doesn't exist, create it
if [ -z $db_name ]; then if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid $app) db_name=$(ynh_sanitize_dbid "$app")
ynh_app_setting_set $app db_name $db_name ynh_app_setting_set "$app" db_name "$db_name"
fi fi
# If final_path doesn't exist, create it # If final_path doesn't exist, create it
if [ -z $final_path ]; then if [ -z "$final_path" ]; then
final_path=/var/www/$app final_path="/var/www/$app"
ynh_app_setting_set $app final_path $final_path ynh_app_setting_set "$app" final_path "$final_path"
fi fi
#================================================= #=================================================
@ -65,7 +65,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# Normalize the URL path syntax # Normalize the URL path syntax
path_url=$(ynh_normalize_url_path $path_url) path_url=$(ynh_normalize_url_path "$path_url")
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
@ -114,7 +114,7 @@ chown -R "$app": "$final_path"
#================================================= #=================================================
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq "1" ] if [ "$is_public" -eq "1" ]
then then
# unprotected_uris allows SSO credentials to be passed anyway. # unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set "$app" unprotected_uris "/" ynh_app_setting_set "$app" unprotected_uris "/"