summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nix/recv.nix2
-rw-r--r--recv8
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 @@
4 4
5stdenv.mkDerivation rec { 5stdenv.mkDerivation rec {
6 name = "recv-${version}"; 6 name = "recv-${version}";
7 version = "0.1"; 7 version = "0.2";
8 src = ../recv; 8 src = ../recv;
9 9
10 phases = [ "buildPhase" "installPhase" ]; 10 phases = [ "buildPhase" "installPhase" ];
diff --git a/recv b/recv
index 8d28884..bc1f6a1 100644
--- a/recv
+++ b/recv
@@ -1,13 +1,13 @@
1#!@zsh@/bin/zsh 1#!@zsh@/bin/zsh
2 2
3set -e
4
3user="$0" 5user="$0"
4[[ -n "$user" ]] || exit 2 6[[ -n "$user" ]] || exit 2
5 7
6homeDir=$(getent passwd "$user" | cut -f6 -d:) 8recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic"
7recvDir="${homeDir}/uucppublic"
8
9[[ -d "$recvDir" ]] || exit 1 9[[ -d "$recvDir" ]] || exit 1
10 10
11umask 007 11umask 770
12 12
13exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions \ No newline at end of file 13exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions \ No newline at end of file