bin/mdw-build: Add a `native' option.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 15 Jan 2016 22:42:54 +0000 (22:42 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 15 Jan 2016 22:42:54 +0000 (22:42 +0000)
Basically, should we apply sanity checks for my own packages which
aren't appropriate for other people's?

bin/mdw-build

index 352518c..9eb466b 100755 (executable)
@@ -70,6 +70,7 @@ Build options:
   [no]upload
   [no]clean
   [no]vpath
+  [no]native
 EOF
 }
 
@@ -95,6 +96,7 @@ debian=yes
 upload=yes
 clean=yes
 vpath=yes
+native=yes
 for opt; do
   case "$opt" in
     checkout)  checkout=yes checkoutrev=HEAD ;;
@@ -104,11 +106,11 @@ for opt; do
     setup)     setup=yes setupcmd=mdw-setup ;;
     setup=*)   setup=yes setupcmd=${opt#*=} ;;
 
-    distcheck | debian | upload | clean | vpath)
+    distcheck | debian | upload | clean | vpath | native)
       eval "$opt=yes"
       ;;
     nocheckout | nosetup | nodistcheck | nodebian | \
-    noupload | noclean | novpath)
+    noupload | noclean | novpath | nonative)
       eval "${opt#no}=no"
       ;;
     *)
@@ -313,9 +315,14 @@ esac
 
 cd $releasepath
 
-if ! tar tf $buildpath/$distdir.tar.gz 2>/dev/null | grep -q RELEASE; then
-  fail "missing RELEASE file in distribution"
-fi
+case $native in
+  yes)
+    if ! tar tf $buildpath/$distdir.tar.gz 2>/dev/null | grep -q RELEASE
+    then
+      fail "missing RELEASE file in distribution"
+    fi
+    ;;
+esac
 
 run mv $buildpath/$distdir.tar.gz .
 case $build in