aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-09-22 15:45:52 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-09-22 15:45:52 +0300
commit6c124692603d4d2dacab5afb07257fbcb454ab68 (patch)
treeae677a467ab586a9fd1609c55d3179af0c9ddf00
parentSublime Text 3: don't auto-complete braces (diff)
downloadlinux-home-6c124692603d4d2dacab5afb07257fbcb454ab68.tar.gz
linux-home-6c124692603d4d2dacab5afb07257fbcb454ab68.zip
fix_permissions.sh: o-w
Diffstat (limited to '')
-rwxr-xr-xfix_permissions.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/fix_permissions.sh b/fix_permissions.sh
index ff0489b..8223002 100755
--- a/fix_permissions.sh
+++ b/fix_permissions.sh
@@ -1,7 +1,14 @@
#!/usr/bin/env bash
+# Some utilities (for example, ssh) fix too relaxed file permissions
+# automatically.
+# Others (GHCi is the reason this script exists) just spit out a warning and
+# ignore such files.
+# This script simply removes the write permission for everybody except myself
+# for every file in this repository.
+
set -o errexit -o nounset -o pipefail
script_dir="$( dirname -- "${BASH_SOURCE[0]}" )"
script_dir="$( cd -- "$script_dir" && pwd )"
-find "$script_dir" -mindepth 1 -path "$script_dir/.git" -prune -o -exec chmod g-w {} +
+find "$script_dir" -mindepth 1 -path "$script_dir/.git" -prune -o -exec chmod go-w {} +