Browse Source

Merge pull request #3906 from thinkyhead/rc_fix_travis_helpers

Less greedy regex in travis helper scripts
pull/1/head
Scott Lahteine 9 years ago
parent
commit
7ba8f2dbc3
  1. 2
      buildroot/bin/opt_disable
  2. 2
      buildroot/bin/opt_enable
  3. 2
      buildroot/bin/opt_enable_adv
  4. 2
      buildroot/bin/opt_set
  5. 2
      buildroot/bin/opt_set_adv
  6. 2
      buildroot/bin/pins_set

2
buildroot/bin/opt_disable

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

2
buildroot/bin/opt_enable

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

2
buildroot/bin/opt_enable_adv

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

2
buildroot/bin/opt_set

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

2
buildroot/bin/opt_set_adv

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

2
buildroot/bin/pins_set

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

Loading…
Cancel
Save