summarylogtreecommitdiffstats
path: root/gk6x
diff options
context:
space:
mode:
authorAakash Hemadri2021-06-03 15:29:35 +0530
committerAakash Hemadri2021-06-03 15:29:35 +0530
commit5ae23792fc98263dbc9681c5224ea6e382819781 (patch)
treed2e162de141f72eaa87902b6f2736d4c417deb36 /gk6x
downloadaur-5ae23792fc98263dbc9681c5224ea6e382819781.tar.gz
Initial commit
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Diffstat (limited to 'gk6x')
-rw-r--r--gk6x16
1 files changed, 16 insertions, 0 deletions
diff --git a/gk6x b/gk6x
new file mode 100644
index 000000000000..6f759fb2126f
--- /dev/null
+++ b/gk6x
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+if [[ $EUID -ne 0 ]]; then
+ echo "GK6X must be run as root" 1>&2
+ exit 1
+fi
+
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
+ SOURCE="$(readlink "$SOURCE")"
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
+done
+DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
+
+mono $DIR/GK6X.exe $@