chiark
/
gitweb
/
~mdw
/
misc
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
locking.c, locking.1: Make the protocol safe if the lockfile is (re)moved.
[misc]
/
with-umask
1
#! /bin/sh -e
2
3
prog=${0##*/}
4
usage="usage: $prog MASK CMD [ARGS ...]"
5
case $1,$# in
6
-h,*) echo "$usage"; exit 0 ;;
7
-*) echo >&2 "unknown option \`$1'"; exit 1 ;;
8
,0 | *,1) echo >&2 "$usage"; exit 1 ;;
9
esac
10
umask $1
11
shift
12
exec "$@"