updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / xpn / xpn.sh
blob5d50b0b56d48eafb0b941ccd3c41a81966aab73a
1 #!/usr/bin/env sh
3 basedir=/usr/lib/xpn
5 # Too many parameters
6 if [ $# -gt 2 ]; then
7 echo "$0: Too many parameters"
8 exit 1
9 fi
11 # The standard case
12 if [ $# -eq 0 ]; then
13 python2 $basedir/xpn.py --home_dir
14 exit 0
17 # Custom directory
18 if [ $# -eq 2 -a $1 = "-c" ]; then
19 python2 $basedir/xpn.py -c $2
20 exit 0
22 test_string=`echo "$1" | grep "\-\-custom_dir"`
23 if [ $# -eq 1 -a -n "$test_string" ]; then
24 python2 $basedir/xpn.py $1
25 exit 0
28 # if this point is reached, something has gone wrong
29 echo "$0: Wrong paramters. Look into the man page."
30 exit 1