#!/bin/sh ## by ryan@slipgate.org ## i hate having a RUN_DEPENDS on bash. ## makes use of $PREFIX, substituted with proper paths during build in ## OpenBSD ports. I hope this can be leveraged by other package systems. ## also this removes the need for four different perl string replacements ## to the original bash script because it made very linux-y assumptions. # define iwads # wads that eternity can load (even though heretic support still seems bork) export wads="doom2.wad doom2f.wad plutonia.wad tnt.wad doom.wad doomu.wad doom1.wad heretic.wad heretic1.wad freedoom.wad freedoomu.wad freedoom1.wad hacx.wad" # set variables for eternity.real export ETERNITYBASE="$HOME/.eternity/base" export DOOMWADDIR="$HOME/.eternity/" # PREFIX gets filled on some systems, fall back to a default if not if [ $PREFIX='' ]; then PREFIX=/usr/local; fi # similar to existing, check for startup.wad for eternity base if [ ! -e "$HOME/.eternity/base/startup.wad" ] then echo "$HOME/.eternity/base/startup.wad not found." echo "Assuming first run or corrupted base" mkdir -p $HOME/.eternity/ cp -fR ${PREFIX}/share/eternity-engine/base $HOME/.eternity/base else echo "Eternity base found at $HOME/.eternity/base/" fi # traverse iwads, install if needed for i in $wads do echo "Searching for: $i" if [ ! -e $HOME/.eternity/$i ] then if [ -e ${PREFIX}/share/doom/$i ] then echo "Installing: $i" ln -s ${PREFIX}/share/doom/$i $HOME/.eternity/$i fi else echo "Found: $i" fi done eternity.real $@