about summary refs log tree commit diff stats
path: root/home-manager/config/lf/cmds
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-03-11 23:28:00 +0100
committerene <ene@sils.li>2023-03-11 23:28:00 +0100
commitc2adfd9716de007625c04b31e44deb78601c1d9f (patch)
tree6af3a81559da86cdf3ace1292e743acc8290142b /home-manager/config/lf/cmds
parentFix(hm/conf/lf): Change the mappings to the cmd names (diff)
downloadnixos-config-c2adfd9716de007625c04b31e44deb78601c1d9f.tar.gz
nixos-config-c2adfd9716de007625c04b31e44deb78601c1d9f.zip
Fix(hm/conf/lf/cmd): Use correct vars in archive.sh
Diffstat (limited to '')
-rw-r--r--home-manager/config/lf/cmds/archive.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/home-manager/config/lf/cmds/archive.sh b/home-manager/config/lf/cmds/archive.sh
index d319116d..86c3d12d 100644
--- a/home-manager/config/lf/cmds/archive.sh
+++ b/home-manager/config/lf/cmds/archive.sh
@@ -10,8 +10,6 @@
 # times.
 set -f
 
-fx="$*"
-
 archivers=$(mktmp)
 echo "tar+zip tar+xz 7z zip" > $archivers;
 
@@ -20,17 +18,17 @@ readp "File Name: " name
 
 case $(awk '{for (i=1; i<=NF; i++) print $i}' $archivers | fzf) in
     "tar+zip")
-        tar -czf "$name".tar.gz "$name"
+        tar -czf "$name".tar.gz "$fx"
         ;;
     "tar+xz")
-        tar -cf "$name".tar $fx
+        tar -cf "$name".tar "$fx"
         xz -z -9 -e -T0 "$name".tar
         ;;
     "7z")
-        7z a "$name".7z $fx
+        7z a "$name".7z "$fx"
         ;;
     "zip")
-        zip -r "$name".zip $fx
+        zip -r "$name".zip "$fx"
         ;;
 esac