this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: check for non-empty dst directory

robin 13e034e5 ad2c6863

+14
+14
ebil.sh
··· 15 15 exit 1 16 16 } 17 17 18 + confirm() { 19 + local msg="$1" 20 + echo -n "$msg [y/N] " 21 + 22 + local confirm 23 + read -r confirm 24 + [[ "${confirm,,}" = 'y' ]] 25 + } 26 + 18 27 phelp() { 19 28 cat <<EOF 20 29 ebil - ebil.club cli ··· 97 106 if [ ! -d "$path" ]; then 98 107 msg 'creating destination directory' "$path" 99 108 mkdir -p "$path" 109 + fi 110 + 111 + if [[ ! -n "$(find "$path" -maxdepth 0 -empty)" ]]; then 112 + warn 'destination directory is not empty' "(${path})" 113 + confirm 'are you sure you want to use this directory?' 100 114 fi 101 115 102 116 if [[ ! -n "$remote" ]]; then