25 lines
370 B
Plaintext
25 lines
370 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
for i in "$@"
|
||
|
do
|
||
|
case $i in
|
||
|
--scope=*)
|
||
|
SCOPE="${i#*=}"
|
||
|
shift # past argument=value
|
||
|
;;
|
||
|
--datadir=*)
|
||
|
DATADIR="${i#*=}"
|
||
|
shift # past argument=value
|
||
|
;;
|
||
|
*)
|
||
|
# unknown option
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
VERSION=$(echo $SCOPE | sed -e 's/\/.*//')
|
||
|
CLUSTER=$(echo $SCOPE | sed -e 's/.*\///')
|
||
|
|
||
|
pg_createcluster $VERSION $CLUSTER
|
||
|
exit $?
|