]> pd.if.org Git - zpackage/blobdiff - zpm-contents
cleanup dead code
[zpackage] / zpm-contents
index 7522c183a647f0f8f9ab34647963e3954e2021db..8b7dde005b9f2314da725bfab9f8a5686e6273d0 100755 (executable)
@@ -22,7 +22,7 @@ if [ ! -f $pkgfile ]; then
 fi
 
 if [ $long -gt 0 ]; then
-       cols="filetype,printf('%3.3s', mode) as mode,username,groupname,"
+       cols="filetype,printf('%.4s', mode) as mode,username,groupname,"
 fi
 
 if [ $pkgonly -eq 1 ]; then
@@ -67,13 +67,10 @@ cols=${cols%,}
                        printf ', '
                fi
 
-               cat <<-EOC
-               case when filetype = 'd' then
-                       rtrim(path,'/') || '/'
-               else
-                       path
-               end as path
-               EOC
+               printf "case\n";
+               printf "when filetype = 'd' then rtrim(path,'/') || '/'\n"
+               printf "when filetype = 'l' then printf('%s -> %s', path, target)\n"
+               printf "else path end as path\n"
        fi
        printf 'from packagefiles_pkgid\nwhere true\n'
        if [ -n "$globlist" ]; then