diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index fe82615..45407b5 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -37,41 +37,6 @@ test "$XDG_BIN_HOME" || export XDG_BIN_HOME="$HOME/.local/bin" # anything on BIN_HOME should be executable form anywhere export PATH="$PATH:$XDG_BIN_HOME" -xdg_isThere() { - if [ -e "$1" ] || [ -h "$1" ]; then - true - else - false - fi -} - -xdg_makeForUser() { - mkdir -p "$1" - chmod 0700 "$1" -} - -if [ -h "$XDG_MEDIA_DIR" ] && [ ! -e "$XDG_MEDIA_DIR" ]; then - rm "$XDG_MEDIA_DIR" - xdg_makeForUser "$XDG_MEDIA_DIR" -fi - -## ensure directories exist -xdg_isThere "$XDG_BIN_HOME" || xdg_makeForUser "$XDG_BIN_HOME" -xdg_isThere "$XDG_CACHE_HOME" || xdg_makeForUser "$XDG_CACHE_HOME" -xdg_isThere "$XDG_CONFIG_HOME" || xdg_makeForUser "$XDG_CONFIG_HOME" -xdg_isThere "$XDG_DATA_HOME" || xdg_makeForUser "$XDG_DATA_HOME" - -# create xdg-user-dirs if necessary -xdg_isThere "$XDG_DESKTOP_DIR" || xdg_makeForUser "$XDG_DESKTOP_DIR" -xdg_isThere "$XDG_DOCUMENTS_DIR" || xdg_makeForUser "$XDG_DOCUMENTS_DIR" -xdg_isThere "$XDG_DOWNLOAD_DIR" || xdg_makeForUser "$XDG_DOWNLOAD_DIR" -xdg_isThere "$XDG_MUSIC_DIR" || xdg_makeForUser "$XDG_MUSIC_DIR" -xdg_isThere "$XDG_PICTURES_DIR" || xdg_makeForUser "$XDG_PICTURES_DIR" -xdg_isThere "$XDG_VIDEOS_DIR" || xdg_makeForUser "$XDG_VIDEOS_DIR" -xdg_isThere "$XDG_PROJECTS_DIR" || xdg_makeForUser "$XDG_PROJECTS_DIR" - -unset -f xdg_isThere xdg_makeForUser - ## Applications that can be set through environment variables export ANDROID_HOME="$XDG_DATA_HOME/android" export ATOM_HOME="$XDG_DATA_HOME/atom"