From: Francois Fleuret Date: Sat, 17 Jun 2017 10:48:33 +0000 (+0200) Subject: Use the realpath instead of the provided filename. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6ac52d5f308a3faa97c5e974c8719ca43ae4430;p=scripts.git Use the realpath instead of the provided filename. --- diff --git a/freeze-dir.sh b/freeze-dir.sh index 14c3070..375db4b 100755 --- a/freeze-dir.sh +++ b/freeze-dir.sh @@ -32,9 +32,9 @@ if [[ ! -d ${FREEZE_DIR} ]]; then fi while [[ "$1" ]]; do - - dir=$(basename "$1") - path=$(dirname "$1") + real_path=$(realpath "$1") + dir=$(basename "${real_path}") + path=$(dirname "${real_path}") full_path="${path}/${dir}" date=$(date +%Y_%b_%d_%H:%M:%S)