Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Easily launch doom games with prboom-plus
- # Additional wads launched from utilitywads dir (see last $exec)
- EXEC='prboom-plus'
- DIR='/home/riley/games/wads'
- LAST='/home/riley/bin/doom_last_played'
- ################### START ################################3
- # check for additonal wads $1,$2 etc
- if [[ -n "$1" ]];then
- OTHER1=$(pwd)/$1
- fi
- if [[ -n "$2" ]];then
- OTHER2=$(pwd)/$2
- fi
- if [[ -n "$3" ]];then
- OTHER3=$(pwd)/$3
- fi
- #########################################################
- clear
- figlet DooM
- echo "** Prboom-plus PWAD loader **"
- echo
- # Get IWAD selection
- echo "Please select an IWAD to load ..."
- select iwad in Doom Doom2 BTSX1 Tnt Plutonia Freedoom Freedoom2 Heretic Hexen; do
- case $iwad in
- Doom)
- IWAD=$DIR/doom.wad
- ;;
- Doom2)
- IWAD=$DIR/doom2.wad
- ;;
- Tnt)
- IWAD=$DIR/tnt.wad
- ;;
- Plutonia)
- IWAD=$DIR/plutonia.wad
- ;;
- Freedoom)
- IWAD=$DIR/freedoom1.wad
- ;;
- Freedoom2)
- IWAD=$DIR/freedoom2.wad
- ;;
- Heretic)
- DIR='/home/riley/games/wads/heretic'
- IWAD=$DIR/heretic.wad
- LAST='/home/riley/bin/heretic_last_played'
- ;;
- Hexen)
- DIR='/home/riley/games/wads/hexen'
- IWAD=$DIR/hexen.wad
- MUS='/home/riley/games/wads/utilitywads/sycraft-hexen-high.wad'
- LAST='/home/riley/bin/hexen_last_played'
- ;;
- BTSX1)
- $EXEC -iwad $DIR/doom2.wad -file $DIR/btsx_e1* $DIR/utilitywads/prboom/*
- exit
- esac
- # Get pwads
- clear
- echo "** Config: $config **"
- echo "Please select a PWAD to load"
- echo
- select pwad in $(cat $LAST) None Quit $(ls $DIR/*.wad) ; do
- case $pwad in
- $LAST)
- pwad=$LAST
- echo $pwad > $LAST
- ;;
- None)
- pwad=none
- ;;
- Quit)
- echo "Goodbye!"
- exit 0
- ;;
- # if pwad selected: write to last played
- *)
- echo $pwad > $LAST
- ;;
- esac
- case $config in
- Heretic)
- $EXEC -iwad $DIR/$IWAD -file $pwad $OTHER
- echo "Goodbye!"
- exit 0
- ;;
- Hexen)
- $EXEC -iwad $DIR/$IWAD -file $pwad $OTHER $MUS
- echo "Goodbye!"
- exit 0
- ;;
- Freedoom)
- $EXEC -iwad $DIR/$IWAD -file $pwad
- echo "Goodbye!"
- exit 0
- ;;
- Freedoom2)
- $EXEC -iwad $DIR/$IWAD -file $pwad
- echo "Goodbye!"
- exit 0
- ;;
- # if anything else declared, use default config
- *)
- clear
- $EXEC -iwad $IWAD -file $pwad $DIR/utilitywads/prboom/* $OTHER1 $OTHER2 $OTHER3
- echo "Goodbye!"
- exit 0
- ;;
- esac
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment