summaryrefslogtreecommitdiffstats
path: root/packaging/git-build
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2016-03-30 21:40:42 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2016-03-30 21:40:42 +0000
commit9ce153ce7167c11adba8ac225edc7a707e97c6eb (patch)
tree9f6e849cce2dcc7e5b4e9e6252c843dc2d0787a2 /packaging/git-build
downloadnetdata-9ce153ce7167c11adba8ac225edc7a707e97c6eb.tar.xz
netdata-9ce153ce7167c11adba8ac225edc7a707e97c6eb.zip
Imported Upstream version 1.0.0upstream/1.0.0
Diffstat (limited to '')
-rwxr-xr-xpackaging/git-build40
1 files changed, 40 insertions, 0 deletions
diff --git a/packaging/git-build b/packaging/git-build
new file mode 100755
index 000000000..e33d2355c
--- /dev/null
+++ b/packaging/git-build
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+# When run from the top-level repository, performs a complete clean
+# and maintainer-mode rebuild of the FireHOL package.
+
+if [ ! -f .gitignore -o ! -f configure.ac -o ! -x autogen.sh ]
+then
+ echo "Run as ./packaging/git-build from an autotools git repository"
+ exit 1
+fi
+
+# If we are genuinely in a git repo, try to clean it up, otherwise
+# just make the assumption
+if [ -d .git ]
+then
+ clean=$(git status -s | grep "^?")
+
+ if [ "$clean" ]
+ then
+ if [ "$1" != "-ok" ]
+ then
+ echo "Warning: this script runs: git clean -d -f -x"
+ echo " ensure all required ?? files are added, then re-run with '-ok'"
+ git status -s | grep '^?'
+ exit 1
+ fi
+ fi
+
+ set -e
+ git clean -d -f -x
+ set +e
+fi
+
+set -e
+./autogen.sh
+./configure --enable-maintainer-mode
+set +e
+make dist
+status=$?
+exit $status