openbsd-ports/www/chromium/files/chrome
robert 65907ca1bc Add a .desktop file for the menus and install the icons too.
Remove the message about bumping shmall and datasize too.
2011-05-19 11:52:06 +00:00

30 lines
884 B
Bash

#!/bin/sh
# $OpenBSD: chrome,v 1.5 2011/05/19 11:52:07 robert Exp $
PROGDIR=TRUEPREFIX/chrome
FDS=400
[ `ulimit -Sn` -lt ${FDS} ] || ulimit -Sn ${FDS}
if [ `ulimit -Sn` -lt ${FDS} ]; then
LMSG="${LMSG}- increase openfiles-max to at least ${FDS}.\n"
fi
if [ ! -z "${LMSG}" ]; then
[ -f /etc/login.conf.db ] && LOGINDB=" and rebuild login.conf.db"
MSG="${MSG}\nYou should make the following changes for your login class in /etc/login.conf${LOGINDB}\n"
MSG="${MSG}(you will need to logout and login for these to take effect).\n${LMSG}"
fi
if [ ! -z "${MSG}" ]; then
MSG="${MSG}\nDo you want to run Chromium anyway?"
MSG="${MSG}\n(If you don't increase these limits, Chromium might fail to work properly.)"
answer=`echo ${MSG} | /usr/X11R6/bin/xmessage -center -buttons yes,no -print -file -`
if [ X"${answer}" = X"no" ]; then
exit 0
fi
fi
exec "${PROGDIR}/chrome" "$@"