]> pd.if.org Git - zpackage/commitdiff
fix eval variable name in zpm-list
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 24 Sep 2018 11:27:47 +0000 (11:27 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 24 Sep 2018 11:27:47 +0000 (11:27 +0000)
zpm-list

index 471a2809a2e370f2372f7661cb326d1c089232a0..5868ef2d02b5ccdf34ac9a88ecc5039e940d449e 100755 (executable)
--- a/zpm-list
+++ b/zpm-list
@@ -22,10 +22,6 @@ if [ -z "$pkgfile" ]; then
        exit 1
 fi
 
-if [ -n "$status" ]; then
-       status=$(zpm quote "$status")
-fi
-
 if [ $nameonly -eq 0 ]; then
        cols="pkgid"
 else
@@ -37,6 +33,7 @@ if [ $verbose -eq 1 ]; then
 fi
 
 if [ -n "$status" ]; then
+       status=$(zpm quote "$status")
        where="where status = '$status'"
 fi
 
@@ -44,8 +41,8 @@ pkgid=$1
 
 if [ -n "$pkgid" ]; then
        eval $(zpm parse -E "$pkgid")
-       if [ -n "$package" ]; then
-               package=$(zpm quote "$package")
+       if [ -n "$name" ]; then
+               package=$(zpm quote "$name")
                where="$where and package = '$package'"
        fi
        if [ -n "$version" ]; then