From 397eafb99c233d3c3fbc1923e67d7bdb4fce3f07 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 3 Sep 2007 20:47:58 +0000 Subject: [PATCH] jannet: Add commands help and install --- scripts/jannet | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/scripts/jannet b/scripts/jannet index 84ec3b77..87de72d4 100644 --- a/scripts/jannet +++ b/scripts/jannet @@ -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