From 17a9f1949fc6160a2996f023c1d852a4e5fd1aae Mon Sep 17 00:00:00 2001 From: goro <qtc-committer@nokia.com> Date: Thu, 18 Dec 2008 14:56:50 +0100 Subject: [PATCH] Fix initial jump to script's home dir --- scripts/snapshots/cleanup_snapshots.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/snapshots/cleanup_snapshots.sh b/scripts/snapshots/cleanup_snapshots.sh index f239cc1af0e..db283edd441 100755 --- a/scripts/snapshots/cleanup_snapshots.sh +++ b/scripts/snapshots/cleanup_snapshots.sh @@ -2,8 +2,8 @@ ## Open script-dir-homed subshell ( -ABS_SCRIPT_DIR=`pwd`/`dirname "$0"` -cd "${ABS_SCRIPT_DIR}" +ABS_SCRIPT_DIR=$(cd $(dirname $(which "$0")) && pwd) +cd "${ABS_SCRIPT_DIR}" || exit 1 ## Internal config -- GitLab