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