You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-roguelike/dwarf-fortress/files/dwarf-fortress

25 lines
516 B

#!/bin/sh
gamesdir=/opt/dwarf-fortress
install="$HOME/.dwarf-fortress"
do_install() {
cp -rn "$gamesdir"/data "$install"/
# DF gets unhappy when this is out of sync
cp -f "$gamesdir"/data/index "$install"/data/
cp -rsn "$gamesdir"/* "$install"/
}
if [ -d "$install" ]; then
# delete dangling symlinks
find -L "$install/" -type l -delete
# ignore "are the same file" errors
do_install 2>/dev/null
else
mkdir "$install" || exit
do_install || exit
fi
cd "$install" || exit
exec ./libs/Dwarf_Fortress "$@"