Update IS_HISTORY check for OpenBSD

This commit is contained in:
Tristan PILAT 2019-03-22 17:17:55 +01:00
parent 950ea6fca6
commit d6ef05803e

View file

@ -265,12 +265,11 @@ if [ "$IS_PKGMIRROR" = 1 ]; then
fi fi
if [ "$IS_HISTORY" = 1 ]; then if [ "$IS_HISTORY" = 1 ]; then
f=/root/.profile file=/root/.profile
grep -q "^HISTFILE=\$HOME/.histfile" $f \ grep -qE "^HISTFILE=\$HOME/.histfile" $file && grep -qE "^export HISTSIZE=10000" $file || echo 'IS_HISTORY FAILED!'
&& grep -q "^export HISTFILE" $f \ if [[ "$VERBOSE" == 1 ]]; then
&& grep -q "^HISTSIZE=1000" $f \ echo "Make sure both 'HISTFILE=$HOME/.histfile' and 'export HISTSIZE=10000' are present in /root/.profile"
&& grep -q "^export HISTSIZE" $f \ fi
|| echo 'IS_HISTORY FAILED!'
fi fi
if [ "$IS_VIM" = 1 ]; then if [ "$IS_VIM" = 1 ]; then