sh: Simple pseudo-fix for missing xdg symlink
HACK - it does not reconnect the symlink correctly if its target indeed returns to the system.
This commit is contained in:
parent
c92afad510
commit
88ab8c10a6
1 changed files with 7 additions and 1 deletions
|
@ -25,7 +25,8 @@ test "$XDG_DESKTOP_DIR" || export XDG_DESKTOP_DIR="$HOME/desktop"
|
||||||
test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents"
|
test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||||
test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads"
|
test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||||
|
|
||||||
export XDG_MUSIC_DIR="$HOME/media/audio/music"
|
export XDG_MEDIA_DIR="$HOME/media"
|
||||||
|
export XDG_MUSIC_DIR="$XDG_MEDIA_DIR/audio/music"
|
||||||
export XDG_PICTURES_DIR="$HOME/pictures"
|
export XDG_PICTURES_DIR="$HOME/pictures"
|
||||||
export XDG_VIDEOS_DIR="$HOME/videos"
|
export XDG_VIDEOS_DIR="$HOME/videos"
|
||||||
|
|
||||||
|
@ -49,6 +50,11 @@ xdg_makeForUser() {
|
||||||
chmod 0700 "$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
|
## ensure directories exist
|
||||||
xdg_isThere "$XDG_BIN_HOME" || xdg_makeForUser "$XDG_BIN_HOME"
|
xdg_isThere "$XDG_BIN_HOME" || xdg_makeForUser "$XDG_BIN_HOME"
|
||||||
xdg_isThere "$XDG_CACHE_HOME" || xdg_makeForUser "$XDG_CACHE_HOME"
|
xdg_isThere "$XDG_CACHE_HOME" || xdg_makeForUser "$XDG_CACHE_HOME"
|
||||||
|
|
Loading…
Reference in a new issue