commit 1b0f7cc43955ea84640df34e9445d97704c83e1e
Author: Elan Ruusamäe <[email protected]>
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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to