Commit a7f3d413 authored by neil's avatar neil
Browse files

fix for solaris

parent 7f39cdc8
......@@ -2103,9 +2103,20 @@ _head_n() {
}
_tail_n() {
if ! tail -n "$1" 2>/dev/null; then
if _is_solaris; then
#fix for solaris
tail -"$1"
else
tail -n "$1"
fi
}
_tail_c() {
if _is_solaris; then
#fix for solaris
tail -"$1"c
else
tail -c "$1"
fi
}
......@@ -2280,7 +2291,7 @@ _setopt() {
if [ ! -f "$__conf" ]; then
touch "$__conf"
fi
if [ -n "$(tail -c1 <"$__conf")" ]; then
if [ -n "$(_tail_c 1 <"$__conf")" ]; then
echo >>"$__conf"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment