From 6d21c096b00e74f9a049d80438622762dde1428c Mon Sep 17 00:00:00 2001 From: Steven Saus Date: Sat, 8 Jun 2024 01:10:17 -0400 Subject: [PATCH] lint changes --- dtcopy.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dtcopy.sh b/dtcopy.sh index c3cd688..3490d61 100644 --- a/dtcopy.sh +++ b/dtcopy.sh @@ -1,4 +1,4 @@ - #!/bin/bash +#!/bin/bash ############################################################################## # @@ -53,7 +53,7 @@ process_a_path () { IFS=/ read -a arr <<< "${1}" i=0 while [ $i -lt "${#arr[@]}" ]; do - arr[$i]= $(printf '%s\n' "${arr[$i]}" | iconv -t ASCII//TRANSLIT - | inline-detox) + arr[$i]=$(printf '%s\n' "${arr[$i]}" | iconv -t ASCII//TRANSLIT - | inline-detox) let i=i+1 done # stitch it back together @@ -96,10 +96,9 @@ process_a_path () { ;; -h|--help) display_help exit - shift ;; # if it's none of these, it should be source, then destination - *) if [ -z $SOURCE ];then + *) if [ -z "$SOURCE" ];then #if no source, set source if [ -d "${1}" ];then SOURCE_TYPE="DIR" @@ -116,7 +115,7 @@ process_a_path () { fi fi else - if [ -z $DEST ];then + if [ -z "$DEST" ];then #if no source, set source if [ -d "${1}" ];then DEST_TYPE="DIR" @@ -126,8 +125,6 @@ process_a_path () { if [ -f "${1}" ];then loud "Specified file destination exists and is not a directory, exiting." exit 98 - DEST_TYPE="EMPTY" - shift fi fi else