diff options
author | Sahal Ansari <github@sahal.info> | 2014-04-01 18:46:02 +0400 |
---|---|---|
committer | Sahal Ansari <github@sahal.info> | 2014-04-01 18:46:02 +0400 |
commit | 759e4789f6c8bcf692bcd1485f323236b3b55f93 (patch) | |
tree | 19e2802a5febc6a9d133b5bd4e92b5f204e4f8c8 /debian/dch-generate.sh | |
parent | 358357db1e15be923ca1e814816a3f765d1403a2 (diff) |
One can now launch the script from any location, not just debian/
Diffstat (limited to 'debian/dch-generate.sh')
-rwxr-xr-x | debian/dch-generate.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/debian/dch-generate.sh b/debian/dch-generate.sh index f86cbaa4..a9583317 100755 --- a/debian/dch-generate.sh +++ b/debian/dch-generate.sh @@ -9,6 +9,7 @@ # version 2 as published by the Free Software Foundation. # warning: the following file has CRLF line endings (Windows) +# the location of the following file is relative to this script cbuild="../src/CurrentBuild.txt" # required for debian packaging @@ -27,10 +28,12 @@ if [ -z "$DEBEMAIL" ]; then DEBEMAIL="tamade@example.org" fi -# check if ./changelog exists, check if $cbuild exists +# where am i located? in $DIR, of course! +DIR="$( cd "$( dirname "$0" )" && pwd )" +cd "$DIR" +# check if debian/changelog exists, check if $cbuild exists if [ ! -e ./changelog ]; then echo "Am I in debian/? I can't find changelog" - echo "Maybe run: touch debian/changelog ?" exit 1 fi if [ ! -e "$cbuild" ]; then |