1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jitsi_ynh.git synced 2024-09-03 19:35:57 +02:00

Update _common.sh

This commit is contained in:
yalh76 2022-03-31 20:43:24 +02:00
parent d767cff787
commit 146c552847

View file

@ -28,9 +28,9 @@ ynh_version_gt ()
#!/bin/bash #!/bin/bash
# Install other YunoHost apps when they are not multi-instance # Install others YunoHost apps
# #
# usage: ynh_install_apps --apps="appfoo appbar?domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666" # usage: ynh_install_apps --apps="appfoo?domain=domain.foo&path=/foo appbar?domain=domain.bar&path=/bar&admin=USER&language=fr&is_public=1&pass?word=pass&port=666"
# | arg: -a, --apps= - apps to install # | arg: -a, --apps= - apps to install
# #
# Requires YunoHost version *.*.* or higher. # Requires YunoHost version *.*.* or higher.
@ -50,7 +50,7 @@ ynh_install_apps() {
for one_app_and_its_args in "${apps_list[@]}" for one_app_and_its_args in "${apps_list[@]}"
do do
# Retrieve the name of the app (part before ?) # Retrieve the name of the app (part before ?)
local one_app=$(echo "$one_app_and_its_args" | awk -F'?' '{print $1}') local one_app=$(cut -d "?" -f1 <<< "$str")
[ -z "$one_app" ] && ynh_die --message="You didn't provided a YunoHost app to install" [ -z "$one_app" ] && ynh_die --message="You didn't provided a YunoHost app to install"
yunohost tools update apps yunohost tools update apps
@ -59,7 +59,7 @@ ynh_install_apps() {
if ! yunohost app list --output-as json --quiet | jq -e --arg id $one_app '.apps[] | select(.id == $id)' >/dev/null if ! yunohost app list --output-as json --quiet | jq -e --arg id $one_app '.apps[] | select(.id == $id)' >/dev/null
then then
# Retrieve the arguments of the app (part after ?) # Retrieve the arguments of the app (part after ?)
local one_argument=$(echo "$one_app_and_its_args" | awk -F'?' '{print $2}') local one_argument=$(cut -d "?" -f2- <<< "$one_app_and_its_args")
[ ! -z "$one_argument" ] && one_argument="--args \"$one_argument\"" [ ! -z "$one_argument" ] && one_argument="--args \"$one_argument\""
# Install the app with its arguments # Install the app with its arguments