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
a7f3d413
Commit
a7f3d413
authored
Jul 29, 2023
by
neil
Browse files
fix for solaris
parent
7f39cdc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
a7f3d413
...
@@ -2103,9 +2103,20 @@ _head_n() {
...
@@ -2103,9 +2103,20 @@ _head_n() {
}
}
_tail_n
()
{
_tail_n
()
{
if
!
tail
-n
"
$1
"
2>/dev/null
;
then
if
_is_solaris
;
then
#fix for solaris
#fix for solaris
tail
-
"
$1
"
tail
-
"
$1
"
else
tail
-n
"
$1
"
fi
}
_tail_c
()
{
if
_is_solaris
;
then
#fix for solaris
tail
-
"
$1
"
c
else
tail
-c
"
$1
"
fi
fi
}
}
...
@@ -2280,7 +2291,7 @@ _setopt() {
...
@@ -2280,7 +2291,7 @@ _setopt() {
if
[
!
-f
"
$__conf
"
]
;
then
if
[
!
-f
"
$__conf
"
]
;
then
touch
"
$__conf
"
touch
"
$__conf
"
fi
fi
if
[
-n
"
$(
tail
-c
1
<
"
$__conf
"
)
"
]
;
then
if
[
-n
"
$(
_
tail
_c
1 <
"
$__conf
"
)
"
]
;
then
echo
>>
"
$__conf
"
echo
>>
"
$__conf
"
fi
fi
...
...
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