[packages/opera] use ~/.config/opera as opera dir in new installations

glen glen at pld-linux.org
Thu May 23 23:46:59 CEST 2013


commit 100d59fa7a0e00c493d6d72f806585ca1355db78
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri May 24 00:46:37 2013 +0300

    use ~/.config/opera as opera dir in new installations

 opera.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/opera.sh b/opera.sh
index 0083587..f967d14 100755
--- a/opera.sh
+++ b/opera.sh
@@ -5,5 +5,13 @@ if [ -f /usr/share/java-utils/java-functions ]; then
 	set_jvm
 fi
 export OPERA_DIR=/usr/share/opera
-export OPERA_PERSONALDIR=$HOME/.opera
+
+# Legacy dir
+export OPERA_PERSONALDIR="$HOME/.opera"
+
+# XDG path
+if [ ! -d "$OPERA_PERSONALDIR" ]; then
+	OPERA_PERSONALDIR="${XDG_CONFIG_HOME:-$HOME/.config}/opera"
+fi
+
 exec /usr/lib/opera/opera "$@"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opera.git/commitdiff/100d59fa7a0e00c493d6d72f806585ca1355db78



More information about the pld-cvs-commit mailing list