summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-02 11:04:37 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-02 11:04:37 -0800
commitfabdb6b65ca32180330434953079e3dc806a97d6 (patch)
tree7081b783e8991fe65d84f345afb6fd44348235de /packaging
parent589f277477a95be53a9a24a29ae15c1bca05ff80 (diff)
downloadsubsurface-fabdb6b65ca32180330434953079e3dc806a97d6.tar.gz
Make sure Ubuntu package built script is started from the right directory
I kept starting it from within the subsurface directory which of course failed but left clutter around. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/ubuntu/make-package.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/packaging/ubuntu/make-package.sh b/packaging/ubuntu/make-package.sh
index df150998e..46f39cc9f 100644
--- a/packaging/ubuntu/make-package.sh
+++ b/packaging/ubuntu/make-package.sh
@@ -1,5 +1,11 @@
#!/bin/bash
# start from the directory above the combined subsurface & subsurface/libdivecomputer directory
+if [[ $(pwd | grep "subsurface$") || ! -d subsurface || ! -d subsurface/libdivecomputer || ! -d subsurface/libgit2 ]] ; then
+ echo "Please start this script from the folder ABOVE the subsurface source directory"
+ echo "which includes libdivecomputer and libgit2 as subdirectories)."
+ exit 1;
+fi
+
VERSION=$(cd subsurface ; git describe | sed -e 's/-g.*$// ; s/^v// ; s/-/./')
echo "building Subsurface" $VERSION
if [[ -d subsurface_$VERSION ]]; then