ddnet/other/config_directory.sh
def 790c1cc0aa Switch new players to DDNet config dir, support Teeworlds as fallback
This way new players will get DDNet directory, old ones can switch
directory if they want, or keep using the old one.

If we ever enforce a switch in a future version, this will make it
easier since older DDNet versions will also support the DDNet directory
already.
2022-04-25 09:50:45 +02:00

22 lines
477 B
Bash
Executable file

#!/bin/sh
case "$(uname -s)" in
CYGWIN*|MINGW*|MSYS*)
if [ -d "$APPDATA/DDNet/" ]; then
explorer "$APPDATA/DDNet/"
else
explorer "$APPDATA/Teeworlds/"
fi;;
Darwin*)
if [ -d "$HOME/Library/Application Support/DDNet/" ]; then
open "$HOME/Library/Application Support/DDNet/"
else
open "$HOME/Library/Application Support/Teeworlds/"
fi;;
*)
if [ -d "$HOME/.ddnet/" ]; then
xdg-open "$HOME/.ddnet/"
else
xdg-open "$HOME/.teeworlds/"
fi;;
esac