jannet: Add commands help and install

This commit is contained in:
Jan Lindemann 2007-09-03 20:47:58 +00:00 committed by Jan Lindemann
commit 397eafb99c

View file

@ -14,12 +14,14 @@ usage()
{ {
cat << EOT cat << EOT
$myname command $myname command [arguments]
command is one of command is one of
help: show this help screen
init: initialize init: initialize
uninit: undo initialization uninit: undo initialization
install: install packages in [arguments]
update: update all jannet software on the system update: update all jannet software on the system
EOT EOT
@ -28,7 +30,11 @@ EOT
fi fi
} }
case $1 in cmd="$1"
shift
case $cmd in
init) init)
if ! channel_present ftp.jannet.de; then if ! channel_present ftp.jannet.de; then
echo -n "adding installation source ... " echo -n "adding installation source ... "
@ -39,6 +45,7 @@ init)
if channel_present; then echo done; else echo failed; fi if channel_present; then echo done; else echo failed; fi
fi fi
;; ;;
uninit) uninit)
if channel_present ftp.jannet.de; then if channel_present ftp.jannet.de; then
echo -n "removing installation source ... " echo -n "removing installation source ... "
@ -46,12 +53,24 @@ uninit)
echo done echo done
fi fi
;; ;;
update) update)
sudo smart update ftp.jannet.de sudo smart update ftp.jannet.de
sudo smart upgrade -y sudo smart upgrade -y
;; ;;
install)
sudo smart update ftp.jannet.de
sudo smart install -y $*
;;
help)
usage 0
;;
*) *)
usage 1 usage 1
;; ;;
esac esac