better dir

This commit is contained in:
tavo-wasd 2023-10-30 10:20:43 -06:00
parent 2fabe40e9d
commit 6b31d28a31

View file

@ -6,7 +6,7 @@ help() {
}
LOC="$1" ; [ -n "$LOC" ] || help
TEMP_DIR="/tmp/sharedir"
TEMP_DIR="$HOME/Public"
[ -d "$LOC" ] && DIR="$LOC" || DIR="$TEMP_DIR"
[ "$DIR" = "$TEMP_DIR" ] && mkdir -p "$TEMP_DIR" && cp -f "$LOC" "$DIR/"