🧑💻 Strip #errors in Configurations deployment
This commit is contained in:
parent
7ff4b70694
commit
c23d035149
|
@ -74,6 +74,8 @@ if [[ $ACTION == "init" ]]; then
|
||||||
# a 'BASE' branch with only defaults as a starting point.
|
# a 'BASE' branch with only defaults as a starting point.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
SED=$(which gsed sed | head -n1)
|
||||||
|
|
||||||
echo "- Initializing BASE branch..."
|
echo "- Initializing BASE branch..."
|
||||||
|
|
||||||
# Use the import branch as the source
|
# Use the import branch as the source
|
||||||
|
@ -82,6 +84,14 @@ if [[ $ACTION == "init" ]]; then
|
||||||
# Copy to a temporary location
|
# Copy to a temporary location
|
||||||
TEMP=$( mktemp -d ) ; cp -R config $TEMP
|
TEMP=$( mktemp -d ) ; cp -R config $TEMP
|
||||||
|
|
||||||
|
# Strip all #error lines
|
||||||
|
IFS=$'\n'; set -f
|
||||||
|
for fn in $( find $TEMP/config -type f -name "Configuration.h" ); do
|
||||||
|
$SED -i~ -e "20,30{/#error/d}" "$fn"
|
||||||
|
rm "$fn~"
|
||||||
|
done
|
||||||
|
unset IFS; set +f
|
||||||
|
|
||||||
# Make sure we're not on the 'BASE' branch...
|
# Make sure we're not on the 'BASE' branch...
|
||||||
git checkout init-repo >/dev/null 2>&1 || exit
|
git checkout init-repo >/dev/null 2>&1 || exit
|
||||||
|
|
||||||
|
@ -149,7 +159,6 @@ if [[ $ACTION == "init" ]]; then
|
||||||
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset TPARA..." >/dev/null
|
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset TPARA..." >/dev/null
|
||||||
|
|
||||||
# Update the %VERSION% in the README.md file
|
# Update the %VERSION% in the README.md file
|
||||||
SED=$(which gsed sed | head -n1)
|
|
||||||
VERS=$( echo $EXPORT | $SED 's/release-//' )
|
VERS=$( echo $EXPORT | $SED 's/release-//' )
|
||||||
eval "${SED} -E -i~ -e 's/%VERSION%/$VERS/g' README.md"
|
eval "${SED} -E -i~ -e 's/%VERSION%/$VERS/g' README.md"
|
||||||
rm -f README.md~
|
rm -f README.md~
|
||||||
|
|
Loading…
Reference in a new issue