~/.s3h might be a symlink

This commit is contained in:
damage 2023-10-09 19:46:27 +02:00
parent 453a453f4f
commit 53212b705a

4
s3h.sh
View File

@ -2,7 +2,7 @@
# config
DIALOG=dialog #gdialog kdialog
START_DIR='~/.s3h'
START_DIR="$HOME/.s3h"
VERSION="1.4"
# TODO: use opt parsing
@ -15,6 +15,8 @@ if [[ $# -eq 1 && -d "$1" ]]; then
START_DIR="$1"
fi
START_DIR=`realpath "$START_DIR"`
if [[ ! -d "$START_DIR" ]]; then
echo "start directory '$START_DIR' does not exist" >&2
echo -e "either create or set 'start directory' parameter\n" >&2