Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
ded4469e
Commit
ded4469e
authored
May 26, 2017
by
neil
Browse files
fix for openbsd, sed doesn't support `I` option.
parent
aa66dfff
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
ded4469e
...
@@ -456,9 +456,9 @@ _h2b() {
...
@@ -456,9 +456,9 @@ _h2b() {
if
[
-z
"
$_URGLY_PRINTF
"
]
;
then
if
[
-z
"
$_URGLY_PRINTF
"
]
;
then
if
_exists xargs
;
then
if
_exists xargs
;
then
_debug2
"xargs"
_debug2
"xargs"
echo
"
$hex
"
|
sed
's/\([0-9A-F]\{2\}\)/\\\\\\x\1/g
I
'
| xargs
printf
echo
"
$hex
"
|
_upper_case |
sed
's/\([0-9A-F]\{2\}\)/\\\\\\x\1/g'
| xargs
printf
else
else
for
h
in
$(
echo
"
$hex
"
|
sed
's/\([0-9A-F]\{2\}\)/ \1/g
I
'
)
;
do
for
h
in
$(
echo
"
$hex
"
|
_upper_case |
sed
's/\([0-9A-F]\{2\}\)/ \1/g'
)
;
do
if
[
-z
"
$h
"
]
;
then
if
[
-z
"
$h
"
]
;
then
break
break
fi
fi
...
@@ -466,7 +466,7 @@ _h2b() {
...
@@ -466,7 +466,7 @@ _h2b() {
done
done
fi
fi
else
else
for
c
in
$(
echo
"
$hex
"
|
sed
's/\([0-9A-F]\)/ \1/g
I
'
)
;
do
for
c
in
$(
echo
"
$hex
"
|
_upper_case |
sed
's/\([0-9A-F]\)/ \1/g'
)
;
do
if
[
-z
"
$ic
"
]
;
then
if
[
-z
"
$ic
"
]
;
then
ic
=
$c
ic
=
$c
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment