about summary refs log tree commit diff stats
path: root/home-manager/config/lf/cmds/dl_file
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-03-12 15:01:33 +0100
committerene <ene@sils.li>2023-03-12 15:01:33 +0100
commita6d319f865e36f1ad51532614ba74585802aebcd (patch)
treebd72deddb9f96e04adb7095f615a14d2f4010d63 /home-manager/config/lf/cmds/dl_file
parentFix(hm/conf/lf): Rewrite some of the cmds (diff)
downloadnixos-config-a6d319f865e36f1ad51532614ba74585802aebcd.tar.gz
nixos-config-a6d319f865e36f1ad51532614ba74585802aebcd.zip
Fix(hm/conf/lf): Update to new shell lib version
Diffstat (limited to 'home-manager/config/lf/cmds/dl_file')
-rwxr-xr-xhome-manager/config/lf/cmds/dl_file10
1 files changed, 5 insertions, 5 deletions
diff --git a/home-manager/config/lf/cmds/dl_file b/home-manager/config/lf/cmds/dl_file
index dfd11f69..e7a1fbcb 100755
--- a/home-manager/config/lf/cmds/dl_file
+++ b/home-manager/config/lf/cmds/dl_file
@@ -4,26 +4,26 @@
 # . ~/.local/lib/shell/lib
 . %SHELL_LIBRARY_PATH
 
-LIB_TEMP_DIR_FOR_SCRIPT=$(mktemp -d)
+
 
 # Provides the ability to download a file by dropping it into a window
 
 url=$(dragon -t -x)
 
 if [ -n "$url" ]; then
-  printf "File Name: "
+  prompt "File Name: "
   name=""
   while [ -z $name ] || [ -e $name ]
   do
     read -r name
     if [ -e "$name" ]; then
-      printf "File already exists, overwrite (y|n): "
+      prompt "File already exists, overwrite [y|N]: "
       read -r ans
 
       if [ "$ans" = "y" ]; then
         break
       else
-        printf "File Name: "
+        prompt "File Name: "
       fi
     fi
   done
@@ -31,7 +31,7 @@ if [ -n "$url" ]; then
   # Download the file with curl
   [ -n "$name" ] && curl -o "$name" "$url" || die "curl failed"
 else
-  die "Url is not valid!"
+  die "Url is null!"
 fi
 
 if [ -d "$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "$LIB_TEMP_DIR_FOR_SCRIPT"; fi