Bladeren bron

Improves travis buildroot regexp

João Brázio 8 jaren geleden
bovenliggende
commit
280af07b4c
No account linked to committer's email address

+ 1
- 1
buildroot/bin/opt_disable Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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"

Laden…
Annuleren
Opslaan