debian: make utilities work when run from any arbitrary directory

This commit is contained in:
Travis Cross 2012-05-05 23:25:18 +00:00
parent 6c7548925c
commit 38379a5f0d
1 changed files with 2 additions and 3 deletions

5
debian/util.sh vendored
View File

@ -2,9 +2,8 @@
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*- ##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### Author: Travis Cross <tc@traviscross.com> ##### Author: Travis Cross <tc@traviscross.com>
pwd="$(pwd)" ddir="."
ddir="debian" [ -n "${0%/*}" ] && ddir="${0%/*}"
[ "${pwd##*/}" = "debian" ] && ddir="."
err () { err () {
echo "$0 error: $1" >&2 echo "$0 error: $1" >&2