aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-05-12 15:19:35 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-05-12 15:19:35 +0300
commit10651adee4fd7b62a549539965ce51249521974c (patch)
tree4631e3eb44b46c66454da6e4a01ec70b275cca24 /tools
parent34eb4779506485928ccbe6efc360604da5333fd8 (diff)
downloadit-kariera-exam-template-10651adee4fd7b62a549539965ce51249521974c.tar
it-kariera-exam-template-10651adee4fd7b62a549539965ce51249521974c.tar.gz
it-kariera-exam-template-10651adee4fd7b62a549539965ce51249521974c.zip
Fixed unary operator error in add feature template
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
)