[packages/rpm-build-tools/merge-pld-builder-client: 239/2675] - validate distro argument

glen glen at pld-linux.org
Mon Dec 19 22:01:01 CET 2016


commit 605c339c9ed0dfcce454e92b81c5cdfc38413217
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Dec 29 10:02:08 2011 +0000

    - validate distro argument
    
    Changed files:
        client/make-request.sh -> 1.101

 make-request.sh | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/make-request.sh b/make-request.sh
index b79854b..a213be8 100755
--- a/make-request.sh
+++ b/make-request.sh
@@ -216,11 +216,35 @@ EOF
 	exit 0
 }
 
+# validate distro, set $distro
+set_distro() {
+	case "$1" in
+	ac)
+		;;
+	ac-java|ac-xen)
+		;;
+	ti)
+		;;
+	ti-dev)
+		;;
+	th)
+		;;
+	th-java)
+		;;
+	aidath)
+		;;
+	*)
+		die "distro \`$1' not known"
+		;;
+	esac
+
+	distro=$1
+}
 
 while [ $# -gt 0 ] ; do
 	case "$1" in
 		--distro | -d)
-			distro=$2
+			set_distro $2
 			shift
 			;;
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd



More information about the pld-cvs-commit mailing list