summarylogtreecommitdiffstats
path: root/gog-the-witcher-2-assassins-of-kings
diff options
context:
space:
mode:
authorDan Beste2017-01-29 22:29:11 -0600
committerDan Beste2017-01-29 22:36:23 -0600
commitb7273547d6a984590aa935705ab8aa32d484aae4 (patch)
tree645c0a13cc70c13e2fa5b9b466c9963ef07645ca /gog-the-witcher-2-assassins-of-kings
parent661a9773157beee1fd9cef340aea621ba2673b71 (diff)
downloadaur-b7273547d6a984590aa935705ab8aa32d484aae4.tar.gz
Initial cleanup
Diffstat (limited to 'gog-the-witcher-2-assassins-of-kings')
-rw-r--r--gog-the-witcher-2-assassins-of-kings26
1 files changed, 23 insertions, 3 deletions
diff --git a/gog-the-witcher-2-assassins-of-kings b/gog-the-witcher-2-assassins-of-kings
index d4696e4c8c2a..18ed60a11106 100644
--- a/gog-the-witcher-2-assassins-of-kings
+++ b/gog-the-witcher-2-assassins-of-kings
@@ -1,4 +1,24 @@
-#!/usr/bin/bash
-gogdir="/opt/gog/the-witcher-2-assassins-of-kings"
+#! /bin/bash
-"$gogdir"/start.sh
+pkgname="gog-the-witcher-2-assassins-of-kings"
+pkgdir="/opt/${pkgname}/"
+run="${pkgdir}/start.sh"
+
+if hash firejail; then
+ echo "Firejail detected; attempting to enforce a sandbox..."
+ if [[ -f "${XDG_CONFIG_HOME}/firejail/${pkgname}.profile" ]]; then
+ echo "Firejail profile for ${pkgname} found in ${XDG_CONFIG_HOME}/firejail/"
+ echo "Enforcing a sandbox!"
+ firejail "${run}"
+ elif [[ -f "/etc/firejail/${pkgname}.profile" ]]; then
+ echo "Firejail profile for ${pkgname} found in /etc/firejail/"
+ echo "Enforcing a sandbox!"
+ firejail "${run}"
+ else
+ echo "No Firejail profile detected!"
+ echo "Skipping Firejail sandbox..."
+ "${run}"
+ fi
+else
+ "${run}"
+fi