Browse Source

Improves travis buildroot regexp

João Brázio 8 years ago
parent
commit
280af07b4c
No account linked to committer's email address

+ 1
- 1
buildroot/bin/opt_disable View File

@@ -1,5 +1,5 @@
1 1
 #!/usr/bin/env bash
2 2
 
3 3
 for opt in "$@" ; do
4
-  eval "sed -i 's/\(\/\/ *\)*\(\#define +$opt[^a-zA-Z0-9_]\)/\/\/\2/g' Marlin/Configuration.h"
4
+  eval "sed -i 's/\([[:blank:]]*\)\(#define \b${opt}\b\)/\1\/\/\2/g' Marlin/Configuration.h"
5 5
 done

+ 5
- 0
buildroot/bin/opt_disable_adv View File

@@ -0,0 +1,5 @@
1
+#!/usr/bin/env bash
2
+
3
+for opt in "$@" ; do
4
+  eval "sed -i 's/\([[:blank:]]*\)\(#define \b${opt}\b\)/\1\/\/\2/g' Marlin/Configuration_adv.h"
5
+done

+ 1
- 1
buildroot/bin/opt_enable View File

@@ -1,5 +1,5 @@
1 1
 #!/usr/bin/env bash
2 2
 
3 3
 for opt in "$@" ; do
4
-  eval "sed -i 's/\/\/ *\(#define +$opt[^a-zA-Z0-9_]\)/\1/g' Marlin/Configuration.h"
4
+  eval "sed -i 's/\/\/[[:blank:]]*\(#define \b${opt}\b\)/\1/g' Marlin/Configuration.h"
5 5
 done

+ 1
- 1
buildroot/bin/opt_enable_adv View File

@@ -1,5 +1,5 @@
1 1
 #!/usr/bin/env bash
2 2
 
3 3
 for opt in "$@" ; do
4
-  eval "sed -i 's/\/\/ *\(#define +$opt[^a-zA-Z0-9_]\)/\1/g' Marlin/Configuration_adv.h"
4
+  eval "sed -i 's/\/\/[[:blank:]]*\(#define \b${opt}\b\)/\1/g' Marlin/Configuration_adv.h"
5 5
 done

+ 1
- 1
buildroot/bin/opt_set View File

@@ -1,3 +1,3 @@
1 1
 #!/usr/bin/env bash
2 2
 
3
-eval "sed -i 's/\(#define +$1 +\)[^ ]*$/\1 $2/g' Marlin/Configuration.h"
3
+eval "sed -i 's/\(#define \b${1}\b\).*$/\1 ${2}/g' Marlin/Configuration.h"

+ 1
- 1
buildroot/bin/opt_set_adv View File

@@ -1,3 +1,3 @@
1 1
 #!/usr/bin/env bash
2 2
 
3
-eval "sed -i 's/\(#define +$1 +\)[^ ]*$/\1 $2/g' Marlin/Configuration_adv.h"
3
+eval "sed -i 's/\(#define \b${1}\b\).*$/\1 ${2}/g' Marlin/Configuration_adv.h"

+ 1
- 1
buildroot/bin/pins_set View File

@@ -1,3 +1,3 @@
1 1
 #!/usr/bin/env bash
2 2
 
3
-eval "sed -i 's/\(#define +$2 +\)[^ ]*$/\1 $3/g' Marlin/pins_$1.h"
3
+eval "sed -i 's/\(#define \b${2}\b\).*$/\1 ${3}/g' Marlin/pins_${1}.h"

Loading…
Cancel
Save