aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-01-10 18:36:15 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-01-10 18:36:15 +0000
commit609aa3e016cdc95fea0f2c4ac6884d240b4c65c9 (patch)
treeb14afcdf08f8b869b94086f8247b53000b61d280 /src
parent99aaee85c645c498a80c811b7e36b53d9f481022 (diff)
downloadsimplepkg-609aa3e016cdc95fea0f2c4ac6884d240b4c65c9.tar.gz
simplepkg-609aa3e016cdc95fea0f2c4ac6884d240b4c65c9.tar.bz2
simplaret: added --remove and command line syntax enhancement
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@88 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src')
-rwxr-xr-xsrc/simplaret18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/simplaret b/src/simplaret
index f0d3ae6..d27bc34 100755
--- a/src/simplaret
+++ b/src/simplaret
@@ -23,7 +23,7 @@ COMMON="/usr/libexec/simplepkg/common.sh"
function simplaret_usage {
echo "usage: [ARCH=otherarch] [VERSION=otherversion] `basename $0` <OPTION> package-name"
- echo -e "\t OPTIONS: --update, --upgrade, --search, --get, --get-patches, --purge"
+ echo -e "\t OPTIONS: --update, --upgrade, --search, --get, --get-patches, --purge, --remove"
exit 1
}
@@ -507,6 +507,7 @@ function simplaret_get_jail_patches {
VERSION="`default_version`"
ARCH="`default_arch`"
+ # TODO: remove it, forcing user to always do a simplaret --update?
simplaret_update
# in case there's something wrong with the jail, abort
@@ -666,13 +667,14 @@ elif [ "$ARCH" == "sparc" ]; then
fi
case $1 in
- --update) simplaret_update ;;
- --search) simplaret_search $2 ;;
- --get) simplaret_get $2 ;;
- --get-patches) simplaret_get_patches ;;
- --purge) shift ; simplaret_purge $* ;;
- --install) simplaret_install $2 ;;
- --upgrade) simplaret_get_patches ; jail-upgrade ;;
+ "--update" | "update") simplaret_update ;;
+ "--search" | "search") simplaret_search $2 ;;
+ "--get" | "get") simplaret_get $2 ;;
+ "--get-patches" | "get-patches") simplaret_get_patches ;;
+ "--purge" | "purge") shift ; simplaret_purge $* ;;
+ "--install" | "install") simplaret_install $2 ;;
+ "--upgrade" | "upgrade") simplaret_get_patches ; jail-upgrade ;;
+ "--remove" | "remove") removepkg $2 ;;
*) simplaret_usage ;;
esac