From d6ef05803e5c92248d1283488ba52d2ebde654e0 Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Fri, 22 Mar 2019 17:17:55 +0100 Subject: [PATCH] Update IS_HISTORY check for OpenBSD --- evocheck.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index 2690d02..1f155ca 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -265,12 +265,11 @@ if [ "$IS_PKGMIRROR" = 1 ]; then fi if [ "$IS_HISTORY" = 1 ]; then - f=/root/.profile - grep -q "^HISTFILE=\$HOME/.histfile" $f \ - && grep -q "^export HISTFILE" $f \ - && grep -q "^HISTSIZE=1000" $f \ - && grep -q "^export HISTSIZE" $f \ - || echo 'IS_HISTORY FAILED!' + file=/root/.profile + grep -qE "^HISTFILE=\$HOME/.histfile" $file && grep -qE "^export HISTSIZE=10000" $file || echo 'IS_HISTORY FAILED!' + if [[ "$VERBOSE" == 1 ]]; then + echo "Make sure both 'HISTFILE=$HOME/.histfile' and 'export HISTSIZE=10000' are present in /root/.profile" + fi fi if [ "$IS_VIM" = 1 ]; then