Use the realpath instead of the provided filename.
[scripts.git] / freeze-dir.sh
index 14c3070..375db4b 100755 (executable)
@@ -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)