diff options
author | Constantin Nickel | 2016-11-20 00:26:46 +0100 |
---|---|---|
committer | Constantin Nickel | 2016-11-20 00:26:46 +0100 |
commit | 296cc5ebffa638520eecf65c6bae9f9a15f5d24d (patch) | |
tree | c0c204fc6c94921229a4bc0b41034ed997c47a8e /fix-permissions.sh | |
download | aur-296cc5ebffa638520eecf65c6bae9f9a15f5d24d.tar.gz |
initial commit
Diffstat (limited to 'fix-permissions.sh')
-rw-r--r-- | fix-permissions.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fix-permissions.sh b/fix-permissions.sh new file mode 100644 index 000000000000..d8b19d73d73d --- /dev/null +++ b/fix-permissions.sh @@ -0,0 +1,15 @@ +#!/usr/bin/sh + +_group="${1:-games}" + +getent group $_group &> /dev/null + +if [ $? != 0 ]; then + echo "group '$_group' not found"; + echo "${0##/} [group] default: games" + exit 1 +fi + +# fix permissions +chgrp -R $_group /opt/dungeon-keeper-gold/{data,save,sound} +chmod -R g+w /opt/dungeon-keeper-gold/{data,save,sound} |