openbsd-ports/devel/xdg-user-dirs/patches/patch-xdg-user-dir
ajacoutot ed38af5c52 Import xdg-user-dirs-0.10
xdg-user-dirs is a tool to help manage "well known" user directories
like the desktop folder and the music folder.  It also handles
localization (i.e. translation) of the filenames.

adapted from FreeBSD port
2008-10-30 16:28:38 +00:00

14 lines
561 B
Plaintext

$OpenBSD: patch-xdg-user-dir,v 1.1.1.1 2008/10/30 16:28:38 ajacoutot Exp $
--- xdg-user-dir.orig Mon Feb 26 16:51:16 2007
+++ xdg-user-dir Thu Oct 30 17:14:03 2008
@@ -1,7 +1,7 @@
#!/bin/sh
-test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
-if [ "x$1" == "xDESKTOP" ]; then
+test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && . ${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}