summaryrefslogtreecommitdiff
path: root/xdg-user-dir
diff options
context:
space:
mode:
authorAdam Jacksson <ajax@freedesktop.org>2007-02-26 15:51:16 +0000
committerAdam Jacksson <ajax@freedesktop.org>2007-02-26 15:51:16 +0000
commit85558b8afbaf404b7d14a5a9d45a94cfdfc863f8 (patch)
treebb7e8406bc11c963e4eba9d76895824a69685556 /xdg-user-dir
Initial revision
Diffstat (limited to 'xdg-user-dir')
-rwxr-xr-xxdg-user-dir8
1 files changed, 8 insertions, 0 deletions
diff --git a/xdg-user-dir b/xdg-user-dir
new file mode 100755
index 0000000..c1ec213
--- /dev/null
+++ b/xdg-user-dir
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
+if [ "x$1" == "xDESKTOP" ]; then
+ eval echo \${XDG_${1}_DIR:-$HOME/Desktop}
+else
+ eval echo \${XDG_${1}_DIR:-$HOME}
+fi