Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
f8bcfeb2
Commit
f8bcfeb2
authored
May 29, 2017
by
neilpang
Browse files
fix xargs issue for freebsd
https://github.com/Neilpang/acme.sh/issues/865#issuecomment-304599955
parent
61852447
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
f8bcfeb2
#!/usr/bin/env sh
#!/usr/bin/env sh
VER
=
2.7.
0
VER
=
2.7.
1
PROJECT_NAME
=
"acme.sh"
PROJECT_NAME
=
"acme.sh"
...
@@ -443,6 +443,11 @@ if [ "$(printf '\x41')" != 'A' ]; then
...
@@ -443,6 +443,11 @@ if [ "$(printf '\x41')" != 'A' ]; then
_URGLY_PRINTF
=
1
_URGLY_PRINTF
=
1
fi
fi
_ESCAPE_XARGS
=
""
if
[
"
$(
printf
%s
'\\x41'
| xargs
printf
)
"
==
'A'
]
;
then
_ESCAPE_XARGS
=
1
fi
_h2b
()
{
_h2b
()
{
if
_exists xxd
;
then
if
_exists xxd
;
then
xxd
-r
-p
xxd
-r
-p
...
@@ -454,7 +459,7 @@ _h2b() {
...
@@ -454,7 +459,7 @@ _h2b() {
jc
=
""
jc
=
""
_debug2 _URGLY_PRINTF
"
$_URGLY_PRINTF
"
_debug2 _URGLY_PRINTF
"
$_URGLY_PRINTF
"
if
[
-z
"
$_URGLY_PRINTF
"
]
;
then
if
[
-z
"
$_URGLY_PRINTF
"
]
;
then
if
_exists xargs
;
then
if
[
"
$_ESCAPE_XARGS
"
]
&&
_exists xargs
;
then
_debug2
"xargs"
_debug2
"xargs"
echo
"
$hex
"
| _upper_case |
sed
's/\([0-9A-F]\{2\}\)/\\\\\\x\1/g'
| xargs
printf
echo
"
$hex
"
| _upper_case |
sed
's/\([0-9A-F]\{2\}\)/\\\\\\x\1/g'
| xargs
printf
else
else
...
...
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