changeset 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
files examples/form-text+img/form/memo.def s4-start.sh
diffstat 2 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/form-text+img/form/memo.def	Mon Aug 03 14:11:53 2015 +0900
@@ -0,0 +1,4 @@
+シリアル:ser:p:serial:
+なまえ:name:s:text:maxlength="40"
+ひとこと:memo:s:textarea:cols="40" rows="5"
+添付ファイル:file:m:image:multiple
--- 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

yatex.org