]> pd.if.org Git - zpackage/commitdiff
support symlinks in zpm-add
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 24 Sep 2018 12:04:12 +0000 (12:04 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 24 Sep 2018 12:04:12 +0000 (12:04 +0000)
zpm-add

diff --git a/zpm-add b/zpm-add
index 5d84d543e294323aa73305bcbaf9b958648e31ca..2621b596cedf08bc7e391427932b7ce16c2374f6 100755 (executable)
--- a/zpm-add
+++ b/zpm-add
@@ -35,6 +35,7 @@ isconfig=0
 # option for "multipackage" just to let the system know that's what you meant
 # option to take filenames from stdin
 # parse package, version, release from file if not given
+# TODO -l follow symlinks, -L follow symlinks, adding all, links and targets
 while getopts :f:vr:l:P:S:cu:g: opt; do
        case $opt in
                f) pkgfile="$OPTARG" ;;
@@ -142,7 +143,7 @@ for path in $*; do
                rpath="$prefix/$rpath"
        fi
 
-       filetype=$(zpm stat -f '%t' "$path")
+       filetype=$(zpm stat -l -f '%t' "$path")
        hash='NULL'
        target='NULL'
        case "$filetype" in