Automatically check for syntax of scripts when building package.
authorMichael Prokop <mika@grml.org>
Mon, 17 May 2010 12:04:51 +0000 (14:04 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 17 May 2010 12:04:51 +0000 (14:04 +0200)
Makefile [new file with mode: 0644]
autoconfig/deploy.sh
debian/rules

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..584a651
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,6 @@
+test:
+       # Checking for syntax errors
+       set -e; for SCRIPT in autoconfig/* framework.sh grml2hd/*/* grml2usb/* grml-debootstrap/* lvm/*; \
+       do \
+               zsh -n $$SCRIPT; \
+       done
index 7deac29..de51037 100644 (file)
@@ -12,7 +12,10 @@ if [ -n "$TESTS_SRC" ] ; then
     wget -m -np -nd $TESTS_SRC/
     cd -
 fi
-chmod +x /tmp/tests/*.sh
+
+if [ -d /tmp/tests ] ; then
+    chmod +x /tmp/tests/*.sh
+fi
 
 TESTS=""
 for file in /tmp/tests/*.sh ; do
index d346d1e..3981e6b 100755 (executable)
@@ -6,6 +6,7 @@
 build: build-stamp
 build-stamp:
        dh_testdir
+       $(MAKE) test
 
        # Building package
        #$(MAKE) -C manpages