Mercurial > hgrepos > hgweb.cgi > s4
diff s4-start.sh @ 86:518e3afcb230
add examples/form-text+img/form/memo.def
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 03 Aug 2015 14:11:53 +0900 |
parents | 465447d8b3ab |
children | 573f0d54eb5c |
line wrap: on
line diff
--- a/s4-start.sh Mon Aug 03 12:53:28 2015 +0900 +++ b/s4-start.sh Mon Aug 03 14:11:53 2015 +0900 @@ -6,8 +6,8 @@ script_dir=${SCRIPT_DIR:-scripts} -admin="" -type="form1" +ADMIN="" +TYPE="form1" ex=examples usage() { @@ -18,7 +18,7 @@ -h Show this help -a ADM Set ADMIN email address to ADM -f Force overwriting - -t TYPE Force overwriting (defaults to $type) + -t TYPE Construction type (defaults to $TYPE) TYPEs are one of directory names in examples except \`common'. EOF @@ -26,24 +26,24 @@ } while getopts a:fht: f; do case $f in - a) admin=$OPTARG;; + a) ADMIN=$OPTARG;; f) force=1;; - t) type=$OPTARG;; + t) TYPE=$OPTARG;; \?|h) usage; exit 1;; esac done shift $(expr $OPTIND - 1) -if [ ! -d $ex/$type ]; then +if [ ! -d $ex/$TYPE ]; then cat<<EOF 1>&2 -Invalid type($type). +Invalid type($TYPE). Types are one of as follows. `ls $ex|grep -v common | sed 's/^/ /'` EOF exit 1 fi -if [ -z "$admin" ]; then +if [ -z "$ADMIN" ]; then cat<<EOF 1>&2 Administrator's email not specified. Please feed administrator email with \`-a' option. @@ -57,9 +57,9 @@ fi . ./s4-funcs.sh || exit 2 -if ! checkdomain $admin; then +if ! checkdomain $ADMIN; then cat<<EOF 1>&2 -Administrator's email - $admin - is invalid(host not found). +Administrator's email - $ADMIN - is invalid(host not found). Please specify existing email address. EOF exit 3 @@ -78,7 +78,7 @@ cat<<EOF -------- The s4 System Successfully Installed -------- EOF - echo "ADMIN=$admin" >> s4-config.sh && rc=0 + echo "ADMIN=$ADMIN" >> s4-config.sh && rc=0 else echo Calling s4-init.sh 'FAILED!!' fi