Change tabs to spaces, move 'if, then' on a single line instead of splitted lines
This commit is contained in:
parent
021125aa33
commit
2a9127168e
4 changed files with 45 additions and 49 deletions
|
@ -33,8 +33,7 @@ get__amount() {
|
||||||
local amount=200
|
local amount=200
|
||||||
|
|
||||||
# It's possible to change some properties of the question by overriding it:
|
# It's possible to change some properties of the question by overriding it:
|
||||||
if [ "$amount" -gt 100 ]
|
if [ "$amount" -gt 100 ]; then
|
||||||
then
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
style: success
|
style: success
|
||||||
value: $amount
|
value: $amount
|
||||||
|
@ -54,8 +53,7 @@ EOF
|
||||||
get__prices() {
|
get__prices() {
|
||||||
local prices
|
local prices
|
||||||
prices="$(grep "DONATION\['" "$install_dir/settings.py" | sed -r "s@^DONATION\['([^']*)'\]\['([^']*)'\] = '([^']*)'@\1/\2/\3@g" | sed -z 's/\n/,/g;s/,$/\n/')"
|
prices="$(grep "DONATION\['" "$install_dir/settings.py" | sed -r "s@^DONATION\['([^']*)'\]\['([^']*)'\] = '([^']*)'@\1/\2/\3@g" | sed -z 's/\n/,/g;s/,$/\n/')"
|
||||||
if [ "$prices" == "," ];
|
if [ "$prices" == "," ]; then
|
||||||
then
|
|
||||||
# Return YNH_NULL if you prefer to not return a value at all.
|
# Return YNH_NULL if you prefer to not return a value at all.
|
||||||
echo YNH_NULL
|
echo YNH_NULL
|
||||||
else
|
else
|
||||||
|
|
|
@ -30,8 +30,7 @@ ynh_script_progression --message="Removing system configurations related to $app
|
||||||
# This should be a symetric version of what happens in the install script
|
# This should be a symetric version of what happens in the install script
|
||||||
|
|
||||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||||
if ynh_exec_warn_less yunohost service status "$app" >/dev/null
|
if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
|
||||||
then
|
|
||||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||||
yunohost service remove "$app"
|
yunohost service remove "$app"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -68,8 +68,7 @@ ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$a
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
if [ "$upgrade_type" == "UPGRADE_APP" ]; then
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||||
|
|
Loading…
Add table
Reference in a new issue