From b6e8ebd66d22abf5439485985a7851e768c71e8a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 8 Jan 2014 21:04:43 -0500 Subject: Be very careful about using $0. --- db-update | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'db-update') diff --git a/db-update b/db-update index cdde63b..86faec3 100755 --- a/db-update +++ b/db-update @@ -1,10 +1,10 @@ #!/bin/bash -. "$(dirname $0)/db-functions" -. "$(dirname $0)/config" +. "$(dirname "$(readlink -e "$0")")/db-functions" +. "$(dirname "$(readlink -e "$0")")/config" if [ $# -ge 1 ]; then - warning "Calling $(basename $0) with a specific repository is no longer supported" + warning "Calling ${0##*/} with a specific repository is no longer supported" exit 1 fi -- cgit v1.2.3