|
@@ -470,21 +470,32 @@ setup_env(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
######################### |
|
|
######################### |
|
|
# main |
|
|
|
|
|
|
|
|
# help and main |
|
|
|
|
|
|
|
|
|
|
|
help(){ |
|
|
|
|
|
echo "Usage: ./setup.sh <cmd> ..." |
|
|
|
|
|
echo " or: ./setup.sh help" |
|
|
|
|
|
echo "Available cmds are: $__setups" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
main(){ |
|
|
main(){ |
|
|
detect_systems |
|
|
detect_systems |
|
|
|
|
|
|
|
|
if test -z "$1" |
|
|
if test -z "$1" |
|
|
then |
|
|
then |
|
|
echo "Usage: ./setup.sh <cmd> ..." |
|
|
|
|
|
echo "Available cmds are: $__setups" |
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
|
help |
|
|
|
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
_cmd=$1 |
|
|
_cmd=$1 |
|
|
shift |
|
|
shift |
|
|
|
|
|
|
|
|
|
|
|
if test "$_cmd" = help |
|
|
|
|
|
then |
|
|
|
|
|
help |
|
|
|
|
|
return 0 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
_msg Running setup_$_cmd |
|
|
_msg Running setup_$_cmd |
|
|
setup_$_cmd "$@" |
|
|
setup_$_cmd "$@" |
|
|
_msg Running setup_$_cmd done |
|
|
_msg Running setup_$_cmd done |
|
|