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
|
||||
|
||||
# It's possible to change some properties of the question by overriding it:
|
||||
if [ "$amount" -gt 100 ]
|
||||
then
|
||||
if [ "$amount" -gt 100 ]; then
|
||||
cat << EOF
|
||||
style: success
|
||||
value: $amount
|
||||
|
@ -54,8 +53,7 @@ EOF
|
|||
get__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/')"
|
||||
if [ "$prices" == "," ];
|
||||
then
|
||||
if [ "$prices" == "," ]; then
|
||||
# Return YNH_NULL if you prefer to not return a value at all.
|
||||
echo YNH_NULL
|
||||
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
|
||||
|
||||
# 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
|
||||
then
|
||||
if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
yunohost service remove "$app"
|
||||
fi
|
||||
|
|
|
@ -68,8 +68,7 @@ ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$a
|
|||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]; then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
|
|
Loading…
Add table
Reference in a new issue