File tree Expand file tree Collapse file tree 2 files changed +11
-200
lines changed Expand file tree Collapse file tree 2 files changed +11
-200
lines changed Original file line number Diff line number Diff line change @@ -140,16 +140,25 @@ if [[ $ACTION == "init" ]]; then
140
140
cp -R " $TEMP /config" .
141
141
find config -type f \! -name " Configuration*" -exec rm " {}" \;
142
142
143
+ addpathlabels () {
144
+ find config -name " Conf*.h" -print0 | while read -d $' \0' fn ; do
145
+ fldr=$( dirname " $fn " )
146
+ blank_line=$( awk ' /^\s*$/ {print NR; exit}' " $fn " )
147
+ $SED -i~ " ${blank_line} i\\ \n#define CONFIG_EXAMPLES_DIR \" $fldr \"\\ " " $fn "
148
+ rm -f " $fn ~"
149
+ done
150
+ }
151
+
143
152
echo " - Adding path labels to all configs..."
144
- config-labels.py > /dev/null 2>&1
153
+ addpathlabels
145
154
146
155
git add . > /dev/null && git commit -m " Examples Customizations" > /dev/null
147
156
148
157
echo " - Copying extras from Marlin..."
149
158
cp -R " $TEMP /config" .
150
159
151
160
# Apply labels again!
152
- config-labels.py > /dev/null 2>&1
161
+ addpathlabels
153
162
154
163
git add . > /dev/null && git commit -m " Examples Extras" > /dev/null
155
164
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments