summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormaz-12015-10-13 10:40:11 +0000
committermaz-12015-10-13 10:40:11 +0000
commit5ce0dd836ff2552c880308c8607d93b91cf90428 (patch)
treefbb57713a67f77ac9605cfae6456fb17cf7a332b
parenteabaa1dcfd93f39ab820c312da80d6146ef90798 (diff)
downloadaur-5ce0dd836ff2552c880308c8607d93b91cf90428.tar.gz
init
-rw-r--r--PKGBUILD2
-rw-r--r--ucloner.sh22
2 files changed, 18 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 301f868b89b..9afba089fd6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ source=(
)
md5sums=('b7bf49a5516cb9e00943e06e3e73adf2'
- 'd0cf77f94dea916577f41952221fafa3'
+ 'a1532c13681dff6f965fbc1ec6114e96'
'45bb2de134f1caa4d0f19d975d5274f4'
'1f913fe9ca34481134bc36e1045e9a20'
'3e6d3d3005380a888b7a97d2b79880cf'
diff --git a/ucloner.sh b/ucloner.sh
index cfda628e0cf..1de575063be 100644
--- a/ucloner.sh
+++ b/ucloner.sh
@@ -1,14 +1,26 @@
#!/bin/sh
export LANGUAGE=`echo $LANG | grep -oP [A-Za-z_]+ | head -1`
-which sudo 2>&1 > /dev/null && SUPER=sudo
-which gksu 2>&1 > /dev/null && SUPER=gksu
-which kdesu 2>&1 > /dev/null && SUPER=kdesu
-
if [ "$( ps -A | grep ucloner_gui)" ] ; then
zenity --title="Error" --error --text="Another uclone instance is running!"
exit 1
fi
cd /opt/ucloner/
-exec $SUPER python2 ./ucloner_gui.py \ No newline at end of file
+
+which sudo && SUPER="sudo"
+which gksu && SUPER="gksu"
+which kdesu && SUPER="kdesu"
+
+case $SUPER in
+"kdesu")
+exec kdesu -c "python2 ./ucloner_gui.py"
+;;
+"gksu")
+exec gksu python2 ./ucloner_gui.py
+;;
+"sudo")
+exec sudo python2 ./ucloner_gui.py
+;;
+esac
+