Skip to content

Commit 2320dfd

Browse files
mikucboehme
authored andcommitted
Adjust sed script so flux.sh can run on OS X, too
Sed is notoriosly divergent across Unixes (http://unix.stackexchange.com/q/13711/376). In this case BSD sed failed with 'undefined label quit'.
1 parent 5bea10c commit 2320dfd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/scripts/flux.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@ fi
8181
# a variable definition:
8282
vars_to_script=$( cat <<'EOF'
8383
s/^[^=]*$//g ; # is this not a variable definition?
84-
t quit ; # then jump to quit
84+
# then jump to quit
85+
t quit
8586
s/\\/\\\\/g ; # otherwise escape backslashes,
8687
s/!/\\!/g ; # escape exclamation marks,
8788
s/='(.*)'$/=\1/ ; # remove quotes,
8889
s/^([^=]+)=(.*)$/s!\\$\1!\2!g ; /g ; # convert to sed regexp command
89-
b ; # and continue with next line
90+
# and continue with next line
91+
b
9092
: quit
9193
q
9294
EOF

0 commit comments

Comments
 (0)