@@ -31,42 +31,45 @@ cat <<EOF > $options
31
31
EOF
32
32
33
33
# ## save the default settings
34
- echo " ### Start: $project_dir /install/settings.sh" >> $options
34
+ source $project_dir /install/settings.sh
35
+ echo " ### ----- Start: $project_dir /install/settings.sh" >> $options
35
36
cat $project_dir /install/settings.sh >> $options
36
- echo " ### End: $project_dir /install/settings" >> $options
37
+ echo " ### ----- End: $project_dir /install/settings" >> $options
37
38
38
39
# ## get command line options and save them to options.sh
39
40
for opt in " $@ "
40
41
do
41
42
case $opt in
42
- -h|--help) usage ;;
43
+ -h|--help) usage ;;
43
44
44
- --git_branch=* )
45
+ --git_branch=* )
45
46
git_branch=${opt#* =}
46
- echo git_branch=" $git_branch " >> $options
47
+ echo git_branch=" $git_branch " >> $options
47
48
;;
48
49
49
50
--* =* )
50
- optvalue=${opt#* =}
51
- optname=${opt%% =* }
52
- optname=${optname: 2}
53
- echo $optname =" $optvalue " >> $options
54
- ;;
51
+ optvalue=${opt#* =}
52
+ optname=${opt%% =* }
53
+ optname=${optname: 2}
54
+ eval $optname =" $optvalue "
55
+ echo $optname =" $optvalue " >> $options
56
+ ;;
55
57
56
- * )
57
- if [ ${opt: 0: 1} = ' -' ]; then usage; fi
58
+ * )
59
+ if [ ${opt: 0: 1} = ' -' ]; then usage; fi
58
60
59
- settings=$opt
60
- if ! test -f " $settings "
61
+ settings=$opt
62
+ if ! test -f " $settings "
61
63
then
62
- echo " File '$settings ' does not exist."
63
- exit 1
64
- fi
65
- echo " ### ----- Start: $settings " >> $options
66
- cat $settings >> $options
67
- echo " ### ----- End: $settings " >> $options
64
+ echo " File '$settings ' does not exist."
65
+ exit 1
66
+ fi
67
+ source $settings
68
+ echo " ### ----- Start: $settings " >> $options
69
+ cat $settings >> $options
70
+ echo " ### ----- End: $settings " >> $options
68
71
echo
69
- ;;
72
+ ;;
70
73
esac
71
74
done
72
75
0 commit comments