summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2016-01-30 20:18:51 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2016-01-30 20:27:04 +0100
commit4050efaff54f940f6986c42233265c19a1307429 (patch)
tree221a3c5f7d5c9af61b0edb2779fb9bd948b62589
parent222ca2c853e0959048dd0eb6da0d649ff41c7d86 (diff)
downloadextbase-generator-cli-4050efaff54f940f6986c42233265c19a1307429.tar.gz
extbase-generator-cli-4050efaff54f940f6986c42233265c19a1307429.tar.bz2
extbase-generator-cli-4050efaff54f940f6986c42233265c19a1307429.zip
Show help text if there are less than 3 arguments specified
-rwxr-xr-xadd_extbase_property.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/add_extbase_property.sh b/add_extbase_property.sh
index a38eda8..f7f19be 100755
--- a/add_extbase_property.sh
+++ b/add_extbase_property.sh
@@ -10,6 +10,39 @@ if [ ! -e "ext_emconf.php" ]; then
exit 1
fi
+if [ $# -lt 3 ]; then
+ echo "Usage:"
+ echo " `basename $0` <ModelName> <newField> <type>"
+ echo
+ echo " <ModelName> without namespace e.g. 'Event'"
+ echo " <newField> the field to be added, camel case as written in the model"
+ echo " <type> is one of: "
+ echo " int"
+ echo " float"
+ echo " bool"
+ echo " string"
+ echo " text"
+ echo " rte"
+ echo " password"
+ echo " date"
+ echo " datetime"
+ echo " time"
+ echo " timesec"
+ echo " select"
+ echo " date_timestamp"
+ echo " datetime_timestamp"
+ echo
+ echo "Examples:"
+ echo " `basename $0` Event title string"
+ echo " `basename $0` Event start datetime"
+ echo " `basename $0` Event end datetime"
+ echo " `basename $0` Event description rte"
+ echo " `basename $0` Event isTop bool"
+ echo " `basename $0` Product price float"
+
+ exit 1
+fi
+
model=$1
property=$2
typ=$3