Parcourir la source

Merge pull request #3906 from thinkyhead/rc_fix_travis_helpers

Less greedy regex in travis helper scripts
Scott Lahteine il y a 8 ans
Parent
révision
7ba8f2dbc3

+ 1
- 1
buildroot/bin/opt_disable Voir le fichier

@@ -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\)/\/\/\2/g' Marlin/Configuration.h"
4
+  eval "sed -i 's/\(\/\/ *\)*\(\#define +$opt[^a-zA-Z0-9_]\)/\/\/\2/g' Marlin/Configuration.h"
5 5
 done

+ 1
- 1
buildroot/bin/opt_enable Voir le fichier

@@ -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\)/\1/g' Marlin/Configuration.h"
4
+  eval "sed -i 's/\/\/ *\(#define +$opt[^a-zA-Z0-9_]\)/\1/g' Marlin/Configuration.h"
5 5
 done

+ 1
- 1
buildroot/bin/opt_enable_adv Voir le fichier

@@ -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\)/\1/g' Marlin/Configuration_adv.h"
4
+  eval "sed -i 's/\/\/ *\(#define +$opt[^a-zA-Z0-9_]\)/\1/g' Marlin/Configuration_adv.h"
5 5
 done

+ 1
- 1
buildroot/bin/opt_set Voir le fichier

@@ -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 +$1 +\)[^ ]*$/\1 $2/g' Marlin/Configuration.h"

+ 1
- 1
buildroot/bin/opt_set_adv Voir le fichier

@@ -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 +$1 +\)[^ ]*$/\1 $2/g' Marlin/Configuration_adv.h"

+ 1
- 1
buildroot/bin/pins_set Voir le fichier

@@ -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 +$2 +\)[^ ]*$/\1 $3/g' Marlin/pins_$1.h"

Chargement…
Annuler
Enregistrer