prefer XDG over hard coded paths, resolves #17
This commit is contained in:
parent
2f6e8b6c11
commit
e30be22339
3
flash
3
flash
|
|
@ -45,9 +45,10 @@
|
|||
# Remember User's Starting Directory
|
||||
PWD="$(pwd)"
|
||||
# Where Decks Are Located for linux & mac
|
||||
# Prefer XDG Configuration before hard coded file paths
|
||||
OS="$(uname)"
|
||||
case "$OS" in
|
||||
"Darwin") DIR="$HOME/Library/Application Support/flash" ;;
|
||||
"Darwin") DIR="${XDG_DATA_HOME:-HOME/Library/Application Support}/flash" ;;
|
||||
"Linux") DIR="${XDG_DATA_HOME:-$HOME/.local/share}/flash" ;;
|
||||
*) DIR="${XDG_DATA_HOME:-$HOME/.local/share}/flash" ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Reference in New Issue