From a6d319f865e36f1ad51532614ba74585802aebcd Mon Sep 17 00:00:00 2001 From: ene Date: Sun, 12 Mar 2023 15:01:33 +0100 Subject: Fix(hm/conf/lf): Update to new shell lib version --- home-manager/config/lf/cmds/dl_file | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'home-manager/config/lf/cmds/dl_file') 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 -- cgit 1.4.1