scripts/games/save.game

32 lines
569 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# Purpose {{{
## Run all other save.game.* scripts.
# }}}
# Vars {{{
script_wd=$(dirname -- "${0}")
## List of scripts
home_script="save.game.home"
steam_script="save.game.steam"
xdg_script="save.game.xdg"
# }}}
# For all scripts, try to run
for script in "${home_script}" "${steam_script}" "${xdg_script}"; do
## If the script doesn't exist
if [ ! -f "${script_wd}/${script}" ]; then
printf '\e[1;35m%-6s\e[m\n' "Loop script ${script} doesn't seems to exist. Abort."
exit 1
fi
## Run the script
sh "${script_wd}/${script}"
done
exit 0