Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

aoe2de-set-initial-profile.sh (Source)

#!/bin/sh
scriptdir="$( dirname "$( readlink -f "${0}" )" )"
indir="$( readlink -f "${scriptdir}/../initial-files" )"
steamid="$( "${scriptdir}/get-account-steamid.sh" | awk '{print $NF}' )"
WINEPREFIX="${WINEPREFIX:-${HOME}/.wine-aoe2de}"
destdir="${WINEPREFIX}/drive_c/users/steamuser/Games/Age of Empires 2 DE/${steamid}"
if test -n "${VERBOSE}" ;
then
    echo "cp -pr \"${indir}/profile\" \"${destdir}\""
fi
if test -n "${APPLY}" ;
then
    mkdir -p "${destdir}"
    cp -pr "${indir}/profile" "${destdir}"
else
    echo "Dry run only! Please run with APPLY=1 to apply the initial profile."
fi