Sophie

Sophie

distrib > Mageia > cauldron > i586 > by-pkgid > 52af18b8bf0649cc1161f4565f80fb68 > files > 5

brogue-1.7.5-1.mga7.src.rpm

#!/bin/bash

user_data_dir=$HOME"/.local/share/brogue/"
game_data_dir="/usr/share/games/brogue/"
brogue_binary="/usr/libexec/brogue/brogue"

if [ ! -e $user_data_dir ]
then
    echo "Creating user data directory at $user_data_dir"
    mkdir -p $user_data_dir
fi

if [ -e $user_data_dir ]
then
    if [ ! -e $user_data_dir"keymap" ]
    then
        echo "Copying keymap template to the user data directory."
        cp -a $game_data_dir"keymap" $user_data_dir
    fi

    if [ -e $brogue_binary ]
    then
        cd $user_data_dir
        $brogue_binary $*
    else
        echo "Alas, the Brogue executable file at $brogue_binary seems to have gone missing."
    fi
fi