Add a --module switch to the release script so we can use the same script
for all three linuxwacom projects.

Signed-off-by: Peter Hutterer <[email protected]>
---
 release.sh |   24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/release.sh b/release.sh
index 2d6f1d4..4a403a7 100755
--- a/release.sh
+++ b/release.sh
@@ -10,8 +10,6 @@ discuss_list="[email protected]"
 module=xf86-input-wacom
 user=${USER}@
 host=shell.sourceforge.net
-srv_path=/home/frs/project/l/li/linuxwacom/$module
-webpath=sourceforge.net/projects/linuxwacom/files/$module
 remote=origin
 
 usage()
@@ -25,6 +23,8 @@ Options:
   --help        this help message
   --ignore-local-changes        don't abort on uncommitted local changes
   --remote      git remote where the change should be pushed (default "origin")
+  --module <module>     release the given module. Default: xf86-input-wacom
+                        Supported modules: xf86-input-wacom, libwacom
 HELP
 }
 
@@ -93,6 +93,11 @@ while [ $# != 0 ]; do
         remote=$1
         shift
         ;;
+    --module)
+        shift
+        module=$1
+        shift
+        ;;
     --*)
         echo "error: unknown option"
         usage
@@ -111,12 +116,25 @@ while [ $# != 0 ]; do
     esac
 done
 
+case "$module" in
+    libwacom)
+        ;;
+    xf86-input-wacom)
+        ;;
+    input-wacom)
+        ;;
+    *)
+        echo "error: unknown module '$module'"
+        exit 1
+esac
+
 if [ -z "$tag_previous" ] || [ -z "$tag_current" ]; then
     echo "error: missing previous or current tag"
     usage
     exit 1
 fi
 
+
 # Check for uncommitted/queued changes.
 if [ "x$ignorechanges" != "x1" ]; then
     set +e
@@ -172,6 +190,8 @@ fi
 modulever=$module-$version
 tarbz2="$modulever.tar.bz2"
 announce="$tarball_dir/$modulever.announce"
+srv_path=/home/frs/project/l/li/linuxwacom/$module
+webpath=sourceforge.net/projects/linuxwacom/files/$module
 
 echo "checking parameters"
 if ! [ -f "$tarball_dir/$tarbz2" ]; then
-- 
1.7.10.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to