aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/add-feature-template.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/add-feature-template.sh b/tools/add-feature-template.sh
index 87b556f..8146c22 100755
--- a/tools/add-feature-template.sh
+++ b/tools/add-feature-template.sh
@@ -152,7 +152,7 @@ for model in "${models[@]}"
do
cat > $subdir/$model${feature_name}ServiceModel.cs<< EOF
using System;$(
-if [ $model != "Create" ]; then
+if [ "$model" != "Create" ]; then
echo -e "\nusing $project_name.Services.Models;"
fi
)
@@ -160,11 +160,12 @@ fi
namespace $project_name.Services.Models.$feature_name
{
public class $model${feature_name}ServiceModel$(
-if [ $model != "Create" ]; then
+if [ "$model" != "Create" ]; then
echo -e ' : BaseServiceModel'
fi
)
- {$(
+ {
+$(
for feature in "${features[@]}"; do
echo -e "\t\tpublic $feature { get; set; }"
done
@@ -234,7 +235,7 @@ for model in "${models[@]}"
do
cat > $subdir/$model${feature_name}WebModel.cs<< EOF
using System;$(
-if [ $model != "Create" ]; then
+if [ "$model" != "Create" ]; then
echo -e "\nusing $project_name.Web.Models;"
fi
)
@@ -242,7 +243,7 @@ fi
namespace $project_name.Web.Models.$feature_name
{
public class $model${feature_name}WebModel$(
-if [ $model != "Create" ]; then
+if [ "$model" != "Create" ]; then
echo -e ' : BaseWebModel'
fi
)