]> git.pld-linux.org Git - packages/skype.git/commitdiff
skype wrapper: allow --dbpath option to specify data dir
authorElan Ruusamäe <glen@delfi.ee>
Tue, 20 Nov 2012 15:10:33 +0000 (17:10 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 20 Nov 2012 15:10:33 +0000 (17:10 +0200)
skype.sh

index 58bab506bea467f3b8ec0a3ddbf5638aa4e10eec..1e6f478dd0d5b35a01f416b3d90755c77828610f 100755 (executable)
--- 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
This page took 0.049226 seconds and 4 git commands to generate.