diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-09-18 17:15:41 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-09-18 17:15:41 -0300 |
commit | ebe7adfa1891e40655021dbd32073e4482d17265 (patch) | |
tree | 40927752048bd954242a108147190ea212d80822 | |
parent | 6a3c06742011a60061487a3def01e87883f5a560 (diff) | |
download | stowpkg-ebe7adfa1891e40655021dbd32073e4482d17265.tar.gz stowpkg-ebe7adfa1891e40655021dbd32073e4482d17265.tar.bz2 |
Change positional arg handling
-rwxr-xr-x | stowpkg | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |