diff options
author | Aakash Hemadri | 2021-06-03 15:29:35 +0530 |
---|---|---|
committer | Aakash Hemadri | 2021-06-03 15:29:35 +0530 |
commit | 5ae23792fc98263dbc9681c5224ea6e382819781 (patch) | |
tree | d2e162de141f72eaa87902b6f2736d4c417deb36 /gk6x | |
download | aur-5ae23792fc98263dbc9681c5224ea6e382819781.tar.gz |
Initial commit
Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
Diffstat (limited to 'gk6x')
-rw-r--r-- | gk6x | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 $@ |