Browse Source

fix for solaris

pull/4720/head
neil 1 year ago
parent
commit
a7f3d413ef
  1. 15
      acme.sh

15
acme.sh

@ -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() {
if [ ! -f "$__conf" ]; then if [ ! -f "$__conf" ]; then
touch "$__conf" touch "$__conf"
fi fi
if [ -n "$(tail -c1 <"$__conf")" ]; then
if [ -n "$(_tail_c 1 <"$__conf")" ]; then
echo >>"$__conf" echo >>"$__conf"
fi fi

Loading…
Cancel
Save