bin/mdw-build: Allow configuration of the `setup' command.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 15 Jan 2016 22:41:34 +0000 (22:41 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 15 Jan 2016 22:41:34 +0000 (22:41 +0000)
This lets us run the setup scripts for packages using other styles of
build system.

bin/mdw-build

index 1f73bcb..352518c 100755 (executable)
@@ -64,7 +64,7 @@ Build options:
 
   [no]checkout[=REV]
   [no]release
-  [no]setup
+  [no]setup[=RUNE]
   [no]distcheck
   [no]debian
   [no]upload
@@ -89,6 +89,7 @@ checkout=yes
 checkoutrev=HEAD
 build=test
 setup=yes
+setupcmd=mdw-setup
 distcheck=yes
 debian=yes
 upload=yes
@@ -100,8 +101,10 @@ for opt; do
     checkout=*) checkout=yes checkoutrev=${opt#*=} ;;
     release)   build=release ;;
     norelease) build=test ;;
+    setup)     setup=yes setupcmd=mdw-setup ;;
+    setup=*)   setup=yes setupcmd=${opt#*=} ;;
 
-    setup | distcheck | debian | upload | clean | vpath)
+    distcheck | debian | upload | clean | vpath)
       eval "$opt=yes"
       ;;
     nocheckout | nosetup | nodistcheck | nodebian | \
@@ -263,7 +266,7 @@ esac
 ## Maybe refresh the build machinery.
 case "$setup" in
   yes)
-    run mdw-setup
+    run $setupcmd
     ;;
 esac