aboutsummaryrefslogtreecommitdiffstats
path: root/create-ssl-certificate
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2008-01-27 14:47:42 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2008-01-27 14:47:42 +0000
commit8955653bd3e37afd97a81ce752559e51b01d8f1d (patch)
tree3b4cadcfd223b540bb3b91288749f8c7e96fbbab /create-ssl-certificate
parent820f75379afdc4e8e2434363341acd30e2a98b9d (diff)
downloadrpm-helper-8955653bd3e37afd97a81ce752559e51b01d8f1d.tar
rpm-helper-8955653bd3e37afd97a81ce752559e51b01d8f1d.tar.gz
rpm-helper-8955653bd3e37afd97a81ce752559e51b01d8f1d.tar.bz2
rpm-helper-8955653bd3e37afd97a81ce752559e51b01d8f1d.tar.xz
rpm-helper-8955653bd3e37afd97a81ce752559e51b01d8f1d.zip
svn keywords expansion
Diffstat (limited to 'create-ssl-certificate')
-rwxr-xr-xcreate-ssl-certificate22
1 files changed, 14 insertions, 8 deletions
diff --git a/create-ssl-certificate b/create-ssl-certificate
index 784d0e4..0e2e250 100755
--- a/create-ssl-certificate
+++ b/create-ssl-certificate
@@ -2,17 +2,23 @@
# $Id$
# helper script for creating ssl certificates
-if [ $# -lt 3 ]; then
- echo "usage: $0 <pkg name> <num installed> <service> <bundle> <group>" 1>&2
+while [ $# -gt 0 ]; do
+ case $1 in
+ -g) group=$2; shift 2;;
+ -b) bundle="true"; shift;;
+ *) args=( ${args[@]:-} $1 ); shift;;
+ esac
+done
+
+pkg=${args[0]} # name of the package
+num=${args[1]} # number of packages installed
+srv=${args[2]} # name of the service
+
+if [ -z "$pkg" -o -z "$num" -o -z "$srv" ]; then
+ echo "usage: $0 [-g <group>] [-b] <pkg name> <num installed> <service>" 1>&2
exit 1
fi
-pkg=$1 # name of the package
-num=$2 # number of packages installed
-srv=$3 # name of the service
-bundle=$4 # bundle mode
-group=$5 # group with read access on key
-
if [ $num = 1 ]; then
# default values
host=$(hostname)