From 33c943a5523579d6c2695dea39fd4d864e07170a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 13 May 2018 12:37:49 +0200 Subject: Bump recv --- nix/recv.nix | 2 +- recv | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nix/recv.nix b/nix/recv.nix index 6bdc559..6704d41 100644 --- a/nix/recv.nix +++ b/nix/recv.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { name = "recv-${version}"; - version = "0.1"; + version = "0.2"; src = ../recv; phases = [ "buildPhase" "installPhase" ]; diff --git a/recv b/recv index 8d28884..bc1f6a1 100644 --- a/recv +++ b/recv @@ -1,13 +1,13 @@ #!@zsh@/bin/zsh +set -e + user="$0" [[ -n "$user" ]] || exit 2 -homeDir=$(getent passwd "$user" | cut -f6 -d:) -recvDir="${homeDir}/uucppublic" - +recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic" [[ -d "$recvDir" ]] || exit 1 -umask 007 +umask 770 exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions \ No newline at end of file -- cgit v1.2.3