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

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

homeDir=$(getent passwd "$user" | cut -f6 -d:)
recvDir="${homeDir}/uucppublic"

[[ -d "$recvDir" ]] || exit 1

umask 007

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