|
@@ -74,6 +74,8 @@ if [[ $ACTION == "init" ]]; then
|
74
|
74
|
# a 'BASE' branch with only defaults as a starting point.
|
75
|
75
|
#
|
76
|
76
|
|
|
77
|
+ SED=$(which gsed sed | head -n1)
|
|
78
|
+
|
77
|
79
|
echo "- Initializing BASE branch..."
|
78
|
80
|
|
79
|
81
|
# Use the import branch as the source
|
|
@@ -82,6 +84,14 @@ if [[ $ACTION == "init" ]]; then
|
82
|
84
|
# Copy to a temporary location
|
83
|
85
|
TEMP=$( mktemp -d ) ; cp -R config $TEMP
|
84
|
86
|
|
|
87
|
+ # Strip all #error lines
|
|
88
|
+ IFS=$'\n'; set -f
|
|
89
|
+ for fn in $( find $TEMP/config -type f -name "Configuration.h" ); do
|
|
90
|
+ $SED -i~ -e "20,30{/#error/d}" "$fn"
|
|
91
|
+ rm "$fn~"
|
|
92
|
+ done
|
|
93
|
+ unset IFS; set +f
|
|
94
|
+
|
85
|
95
|
# Make sure we're not on the 'BASE' branch...
|
86
|
96
|
git checkout init-repo >/dev/null 2>&1 || exit
|
87
|
97
|
|
|
@@ -149,7 +159,6 @@ if [[ $ACTION == "init" ]]; then
|
149
|
159
|
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset TPARA..." >/dev/null
|
150
|
160
|
|
151
|
161
|
# Update the %VERSION% in the README.md file
|
152
|
|
- SED=$(which gsed sed | head -n1)
|
153
|
162
|
VERS=$( echo $EXPORT | $SED 's/release-//' )
|
154
|
163
|
eval "${SED} -E -i~ -e 's/%VERSION%/$VERS/g' README.md"
|
155
|
164
|
rm -f README.md~
|