]> git.sev.monster Git - dotfiles.git/commitdiff
apkv: fix list with special chars in pkg name
authorsev <git@sev.monster>
Thu, 5 Aug 2021 19:57:26 +0000 (14:57 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
bin/apkv

index 7ae7051e1a55ed5277623a3d73ffd639011848ed..d8035bdc64932739d090725d74dc5fe8f1e0f994 100755 (executable)
--- a/bin/apkv
+++ b/bin/apkv
@@ -103,7 +103,7 @@ if [ "$method" = list ]; then
                 #      replacing chars may result in variable collision—but
                 #      official apk repos do not have any package names that
                 #      would cause issues
                 #      replacing chars may result in variable collision—but
                 #      official apk repos do not have any package names that
                 #      would cause issues
-                eval "__$(echo $c | tr -s '.:-' _)=1"
+                eval "__$(echo $c | tr -s '.:+-' _ | tr -s '<=~>@' "\n" | head -1)=1"
             done
         done
         # check world against owned packages
             done
         done
         # check world against owned packages
@@ -111,7 +111,7 @@ if [ "$method" = list ]; then
         orphans=$(
             for x in $(cat /etc/apk/world | grep -v '^\.'); do
                 eval "[ \${__$(
         orphans=$(
             for x in $(cat /etc/apk/world | grep -v '^\.'); do
                 eval "[ \${__$(
-                         echo $x | tr -s '.:-' _ | tr -s '<=~>@' "\n" | head -1
+                         echo $x | tr -s '.:+-' _ | tr -s '<=~>@' "\n" | head -1
                      )-0} -eq 0 ]" && echo $x
             done
         )
                      )-0} -eq 0 ]" && echo $x
             done
         )
This page took 0.057497 seconds and 4 git commands to generate.