diff options
author | sikfeng@gmail.com | 2018-10-29 19:10:56 +0800 |
---|---|---|
committer | sikfeng@gmail.com | 2018-10-29 19:10:56 +0800 |
commit | 9c5595d32ac9feaebddb301d0c480c952735bdf6 (patch) | |
tree | de202962d0ebd5720b646745e0f2884abc21ab7f /gog-xenonauts | |
download | aur-gog-xenonauts.tar.gz |
first commit yay
Diffstat (limited to 'gog-xenonauts')
-rw-r--r-- | gog-xenonauts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gog-xenonauts b/gog-xenonauts new file mode 100644 index 000000000000..e1aff47dd20e --- /dev/null +++ b/gog-xenonauts @@ -0,0 +1,24 @@ +#!/bin/bash + +pkgname='gog-xenonauts' +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 |