diff options
author | Dan Beste | 2017-01-29 22:29:11 -0600 |
---|---|---|
committer | Dan Beste | 2017-01-29 22:36:23 -0600 |
commit | b7273547d6a984590aa935705ab8aa32d484aae4 (patch) | |
tree | 645c0a13cc70c13e2fa5b9b466c9963ef07645ca /gog-the-witcher-2-assassins-of-kings | |
parent | 661a9773157beee1fd9cef340aea621ba2673b71 (diff) | |
download | aur-b7273547d6a984590aa935705ab8aa32d484aae4.tar.gz |
Initial cleanup
Diffstat (limited to 'gog-the-witcher-2-assassins-of-kings')
-rw-r--r-- | gog-the-witcher-2-assassins-of-kings | 26 |
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 |