瀏覽代碼

Improves travis buildroot regexp

João Brázio 8 年之前
父節點
當前提交
280af07b4c
No account linked to committer's email address

+ 1
- 1
buildroot/bin/opt_disable 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存