aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-09-18 17:15:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-09-18 17:15:41 -0300
commitebe7adfa1891e40655021dbd32073e4482d17265 (patch)
tree40927752048bd954242a108147190ea212d80822
parent6a3c06742011a60061487a3def01e87883f5a560 (diff)
downloadstowpkg-ebe7adfa1891e40655021dbd32073e4482d17265.tar.gz
stowpkg-ebe7adfa1891e40655021dbd32073e4482d17265.tar.bz2
Change positional arg handling
-rwxr-xr-xstowpkg7
1 files changed, 4 insertions, 3 deletions
diff --git a/stowpkg b/stowpkg
index 1263045..3327245 100755
--- a/stowpkg
+++ b/stowpkg
@@ -84,7 +84,7 @@ stowpkg_usage () {
}
stowpkg_search () {
- local package="$2"
+ local package="$1"
if [ ! -z "$package" ]; then
stowpkg_search | grep "$package$"
@@ -94,7 +94,7 @@ stowpkg_search () {
}
stowpkg_install () {
- local package="$2"
+ local package="$1"
if [ -z "$package" ]; then
stowpkg_usage
@@ -171,7 +171,7 @@ stowpkg_install () {
stowpkg_build $package $version
}
-function stowpkg_build () {
+stowpkg_build () {
local package="$1"
local version="$2"
@@ -216,6 +216,7 @@ function stowpkg_build () {
# Dispatch
if grep -q "^stowpkg_$ACTION () {$" $0; then
__stowpkg_initialize
+ shift
stowpkg_$ACTION $*
else
stowpkg_usage