mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
[enh] default value for packages list if empty
This commit is contained in:
parent
ce9bb61c8e
commit
bed3965013
1 changed files with 11 additions and 5 deletions
16
ynh-dev
16
ynh-dev
|
@ -212,10 +212,16 @@ function show_vm_ip()
|
||||||
function use_git()
|
function use_git()
|
||||||
{
|
{
|
||||||
assert_inside_vm
|
assert_inside_vm
|
||||||
local PACKAGES="$@"
|
local PACKAGES=("$@")
|
||||||
for PACKAGE in "$PACKAGES";
|
|
||||||
|
if [ "$PACKAGES" = "" ]
|
||||||
|
then
|
||||||
|
PACKAGES=('moulinette' 'ssowat' 'yunohost' 'yunohost-admin')
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i in ${!PACKAGES[@]};
|
||||||
do
|
do
|
||||||
case $PACKAGE in
|
case ${PACKAGES[i]} in
|
||||||
ssowat)
|
ssowat)
|
||||||
create_sym_link "/ynh-dev/ssowat" "/usr/share/ssowat"
|
create_sym_link "/ynh-dev/ssowat" "/usr/share/ssowat"
|
||||||
success "Now using Git repository for SSOwat"
|
success "Now using Git repository for SSOwat"
|
||||||
|
@ -312,7 +318,7 @@ function use_git()
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
error "Invalid package '$PACKAGE': correct arguments are 'yunohost', 'ssowat', 'moulinette', 'yunohost-admin'"
|
error "Invalid package '${PACKAGES[i]}': correct arguments are 'yunohost', 'ssowat', 'moulinette', 'yunohost-admin' or nothing for all"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -373,4 +379,4 @@ function run_tests()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main $@
|
||||||
|
|
Loading…
Add table
Reference in a new issue