Show possible variants

This commit is contained in:
Bob Mottram 2016-10-08 19:55:21 +01:00
parent 16123cb9d7
commit b507d20f72
3 changed files with 14 additions and 1 deletions

View File

@ -288,7 +288,8 @@ function parse_args {
fi
if [[ $(is_valid_variant) == "0" ]]; then
echo $"'$SYSTEM_TYPE' is an unrecognised ${PROJECT_NAME} variant."
echo $"'$SYSTEM_TYPE' is an unrecognised ${PROJECT_NAME} variant. Possible variants are:"
show_available_variants
exit 367245
fi
}

View File

@ -66,6 +66,8 @@ function show_help {
echo $' --ns2 Second DNS nameserver'
echo $' --repo Debian repository'
echo ''
echo 'Possible variants are:'
show_available_variants
exit 0
}

View File

@ -124,6 +124,16 @@ function is_valid_variant {
return "0"
}
function show_available_variants {
available_variants_list=()
available_system_variants
for variant_str in "${available_variants_list[@]}"
do
echo " $variant_str"
done
}
# mark a given app as having been removed so that it doesn't get reinstalled on updates
function remove_app {
app_name=$1