Display usage information in case of unknown action.
This commit is contained in:
parent
ebca0efb8e
commit
ac4d188dfa
1 changed files with 19 additions and 0 deletions
19
sit
19
sit
|
@ -14,6 +14,24 @@ SIT_PATH=$(cd $(dirname $PWD/$0); pwd)
|
||||||
SIT_CONFIG_FILE=$SIT_PATH/etc/sit.conf
|
SIT_CONFIG_FILE=$SIT_PATH/etc/sit.conf
|
||||||
SIT_USER_CONFIG_FILE=$HOME/.sit
|
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 to be performed
|
||||||
sit_action=$2
|
sit_action=$2
|
||||||
if [[ -n $sit_action ]] ; then
|
if [[ -n $sit_action ]] ; then
|
||||||
|
@ -263,6 +281,7 @@ case $sit_action in
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown action $sit_action"
|
echo "Unknown action $sit_action"
|
||||||
|
usage
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue