[packages/skype] skype wrapper: allow --dbpath option to specify data dir

glen glen at pld-linux.org
Tue Nov 20 16:10:38 CET 2012


commit 1b0f7cc43955ea84640df34e9445d97704c83e1e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Nov 20 17:10:33 2012 +0200

    skype wrapper: allow --dbpath option to specify data dir

 skype.sh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/skype.sh b/skype.sh
index 58bab50..1e6f478 100755
--- a/skype.sh
+++ b/skype.sh
@@ -1,5 +1,23 @@
 #!/bin/sh
 
+# parses --dbpath argument from skype args ignores everything else
+parse_args() {
+	local arg
+	while [ $# -gt 0 ]; do
+		case "$1" in
+		--dbpath)
+			SKYPE_DIR=$2
+			return
+		;;
+		--dbpath=*)
+			SKYPE_DIR=${1#--dbpath=}
+			return
+		;;
+		esac
+		shift
+	done
+}
+
 # Legacy dir
 SKYPE_DIR="$HOME/.Skype"
 
@@ -8,6 +26,8 @@ if [ ! -d "$SKYPE_DIR" ]; then
 	SKYPE_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/Skype"
 fi
 
+parse_args "$@"
+
 if [ ! -d "$SKYPE_DIR" ]; then
 	install -d "$SKYPE_DIR"
 fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/skype.git/commitdiff/1b0f7cc43955ea84640df34e9445d97704c83e1e



More information about the pld-cvs-commit mailing list