summaryrefslogtreecommitdiff
path: root/recv
blob: bc1f6a1a3ce50a1b9f5213b40fc701bbc6df5671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!@zsh@/bin/zsh

set -e

user="$0"
[[ -n "$user" ]] || exit 2

recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic"
[[ -d "$recvDir" ]] || exit 1

umask 770

exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions