Display usage information in case of unknown action.

This commit is contained in:
Christoph Niethammer 2016-05-02 08:55:19 +00:00
parent ebca0efb8e
commit ac4d188dfa

19
sit
View file

@ -14,6 +14,24 @@ SIT_PATH=$(cd $(dirname $PWD/$0); pwd)
SIT_CONFIG_FILE=$SIT_PATH/etc/sit.conf
SIT_USER_CONFIG_FILE=$HOME/.sit
function usage() {
echo "Usage: $0 [action] <sit package name>"
echo "Valid actions:"
echo " sit_sitinfo"
echo " unpack"
echo " prepare"
echo " configure"
echo " build"
echo " pretest"
echo " install"
echo " posttest"
echo " postinst"
echo " copy_logs"
echo " setperms"
echo " all"
exit 0
}
# sit action to be performed
sit_action=$2
if [[ -n $sit_action ]] ; then
@ -263,6 +281,7 @@ case $sit_action in
;;
*)
echo "Unknown action $sit_action"
usage
esac