comparison bin/dotfile-chmod.sh @ 211:21df76f94578

Added script/hook for keeping permissions set sanely (ssh complains sometimes)
author Steve Huston <huston@srhuston.net>
date Fri, 08 Jan 2021 09:51:13 -0500
parents
children
comparison
equal deleted inserted replaced
210:25e7a79f5ba0 211:21df76f94578
1 #!/bin/bash
2 # I wanted this to be a fancy test to see if the files/directories we care
3 # about were updated and make sure the permissions are set right, but hg
4 # doesn't tell you enough in the update hook since you could be traversing
5 # many updates from the current revision to now (unlike commit which gives you
6 # the earliest part of the transaction to compare against tip). So instead
7 # we'll just do this on every update, which isn't too costly anyway.
8 #
9 # Add to .hg/hgrc:
10 # [hooks]
11 # update = ~/bin/dotfile-chmod.sh
12
13 ROOT=`hg root`
14
15 chmod -f 700 $ROOT/.ssh $ROOT/.ssh/sockets
16 chmod -f 600 $ROOT/.ssh/config
17
18 exit 0