aboutsummaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-12-03 22:50:10 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-12-03 22:50:10 +0000
commit5f631dc3ab9adc23f29573e5772088360dd24707 (patch)
tree0f1f259c063ed67dac418e9dbeb810c70ea6abdb /trunk/src
parent302687070a51d4ea8ce8ebd5ab17324c446fbd06 (diff)
downloadsimplepkg-5f631dc3ab9adc23f29573e5772088360dd24707.tar.gz
simplepkg-5f631dc3ab9adc23f29573e5772088360dd24707.tar.bz2
simplaret: deleted simplaret_distro_folder; also solved #11; small changes at generic.mkSlackBuild
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@466 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src')
-rwxr-xr-xtrunk/src/simplaret54
1 files changed, 13 insertions, 41 deletions
diff --git a/trunk/src/simplaret b/trunk/src/simplaret
index b08ba59..7f96fba 100755
--- a/trunk/src/simplaret
+++ b/trunk/src/simplaret
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# simplaret v0.2: simplepkg's retrieval tool
+# simplaret v0.3: simplepkg's retrieval tool
# feedback: rhatto at riseup.net | gpl
#
# Simplaret is free software; you can redistribute it and/or modify it under the
@@ -29,8 +29,8 @@ fi
function simplaret_usage {
- echo "usage: [ARCH=otherarch] [VERSION=otherversion] $BASENAME <OPTION> package-name"
- echo -e "\t OPTIONS: --install, --update, --upgrade, --search, --get, --get-patches, --purge, --remove"
+ echo "usage: [ARCH=otherarch] [VERSION=otherversion] $BASENAME [OPTION] package-name"
+ echo -e "\t OPTIONS: --help, --install, --update, --upgrade, --search, --get, --get-patches, --purge, --remove"
exit 1
}
@@ -215,8 +215,8 @@ function simplaret_repository_url {
fi
if [ "$repos_type" == "root" ]; then
- simplaret_distro_folder
- repository_url="$repository_url/$DISTRO_FOLDER/$EXTRA_FOLDER"
+ simplaret_set_arch
+ repository_url="$repository_url/`basename $repository_url`/"
fi
}
@@ -974,41 +974,6 @@ function simplaret_install {
}
-function simplaret_distro_folder {
-
- # first we point to the correct arch
- simplaret_set_arch
-
- # then we set the distro folder
- if [ "$ARCH" == "i386" ]; then
- DISTRO="slackware"
- DISTRO_FOLDER="$DISTRO-$VERSION"
- elif [ "$ARCH" == "x86_64" ]; then
- # EXTRA_FOLDER="tree"
- DISTRO="slamd64"
- DISTRO_FOLDER="$DISTRO-$VERSION"
- elif [ "$ARCH" == "s390" ]; then
- DISTRO="slack390"
- DISTRO_FOLDER="$DISTRO-$VERSION"
- elif [ "$ARCH" == "x86_uclibc" ]; then
- DISTRO="ucslack"
- DISTRO_FOLDER="$DISTRO-$VERSION"
- elif [ "$ARCH" == "arm" ]; then
- DISTRO="armedslack"
- DISTRO_FOLDER="$DISTRO-$VERSION"
- elif [ "$ARCH" == "powerpc" ]; then
- DISTRO="slackintosh"
- DISTRO_FOLDER="$VERSION"
- elif [ "$ARCH" == "sparc" ]; then
- DISTRO="splack"
- DISTRO_FOLDER="tree-$VERSION"
- else
- DISTRO="$ARCH"
- DISTRO_FOLDER="$DISTRO-$VERSION"
- fi
-
-}
-
function simplaret_set_arch {
# set correct value for ARCH
@@ -1145,6 +1110,13 @@ case $1 in
"--purge" | "purge") shift ; simplaret_req_arg $1 simplaret_purge $* ;;
"--install" | "install") shift ; simplaret_req_arg $1 ; simplaret_install $* ;;
"--remove" | "remove") simplaret_req_arg $2 ; ROOT=/$ROOT removepkg $2 ;;
- *) simplaret_usage ;;
+ "--help" | "help") simplaret_usage ;;
+ *)
+ if echo $1 | grep -v '^--'; then
+ simplaret_install $*
+ else
+ simplaret_usage
+ fi
+ ;;
esac