]> git.pld-linux.org Git - packages/skype.git/blame - skype.sh
updated to 4.2.0.11
[packages/skype.git] / skype.sh
CommitLineData
74845f76
ER
1#!/bin/sh
2
1b0f7cc4
ER
3# parses --dbpath argument from skype args ignores everything else
4parse_args() {
5 local arg
6 while [ $# -gt 0 ]; do
7 case "$1" in
8 --dbpath)
9 SKYPE_DIR=$2
10 return
11 ;;
12 --dbpath=*)
13 SKYPE_DIR=${1#--dbpath=}
14 return
15 ;;
16 esac
17 shift
18 done
19}
20
74845f76
ER
21# Legacy dir
22SKYPE_DIR="$HOME/.Skype"
23
24# XDG path
25if [ ! -d "$SKYPE_DIR" ]; then
26 SKYPE_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/Skype"
27fi
28
1b0f7cc4
ER
29parse_args "$@"
30
74845f76
ER
31if [ ! -d "$SKYPE_DIR" ]; then
32 install -d "$SKYPE_DIR"
33fi
34
35if [ -f "$SKYPE_DIR/env" ]; then
36 . "$SKYPE_DIR/env"
37fi
38
39exec /usr/lib/skype --dbpath="$SKYPE_DIR" "$@"
This page took 0.026463 seconds and 4 git commands to generate.