local-bin/apsalar/dwarf-fortress

25 lines
543 B
Bash
Executable File

#!/bin/sh
dwarfdir="/games/dwarf-fortress"
timestamp=$(date +"%Y%m%d-%H.%M.%S")
# Remove libstdc++.so.6 since it's too old for bitbreaker
if [[ -f "$dwarfdir/libs/libstdc++.so.6" ]]; then
rm "$dwarfdir/libs/libstdc++.so.6"
echo "Removed bundled libstdc++.so.6"
fi
# Clear the gamelog for stream
if [[ -f "$dwarfdir/gamelog.txt" ]]; then
mv "$dwarfdir/gamelog.txt" "$dwarfdir/logs/gamelog-$timestamp.txt"
fi
cd $dwarfdir
if [[ -f "dfhack" ]]; then
echo "DFHack installed, using dfhack"
alacritty -e ./dfhack -t "DFHack"
else
./df
fi