aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/fix_permissions.sh
blob: 850633798f162688c7f415b5f4c1b42aef3476a8 (plain) (tree)
1
2
3
4
5
6
7
8
9

                   
                                                                    


                                                                               
 
                                     
                                 


                                                

                   


                                               
                
#!/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
shopt -s inherit_errexit lastpipe

script_dir="$( dirname -- "${BASH_SOURCE[0]}" )"
script_dir="$( cd -- "$script_dir" && pwd )"
readonly script_dir

cd -- "$script_dir"
export PATH="$script_dir/../config-links:$PATH"

links-chmod go-w