wrapper.sh.in 608 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. LNX_ROOT=$(sysctl -n compat.linux.emul_path)
  3. if [ ! -f "$LNX_ROOT/proc/self/exe" -o ! -d "$LNX_ROOT/sys/dev/char" ]
  4. then
  5. echo "This program requires mounted linprocfs(5) and linsysfs(5)" >&2
  6. exit 1
  7. fi
  8. # OpenAL Soft uses PulseAudio by default, which might not work on FreeBSD
  9. ALSOFT_CONF=$LNX_ROOT/etc/openal/alsoft.conf
  10. if ! grep -qs '^drivers[[:blank:]]*=[[:blank:]]*oss' "$ALSOFT_CONF"
  11. then
  12. echo "If there's no sound, try putting \`oss' as the first item" \
  13. "on the \`drivers' line in the $ALSOFT_CONF file." | fmt -76 >&2
  14. sleep 2
  15. fi
  16. cd %%DATADIR%% && exec $LNX_ROOT/bin/bash ./heaven