diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-13 12:52:26 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-13 12:52:26 +0200 |
commit | e5d3fd420ff355d8399de0df2f601772951c0e63 (patch) | |
tree | cdb36908599180a71ee32e8d1357b39bc7c7f8e6 | |
parent | 33c943a5523579d6c2695dea39fd4d864e07170a (diff) | |
download | utils-e5d3fd420ff355d8399de0df2f601772951c0e63.tar utils-e5d3fd420ff355d8399de0df2f601772951c0e63.tar.gz utils-e5d3fd420ff355d8399de0df2f601772951c0e63.tar.bz2 utils-e5d3fd420ff355d8399de0df2f601772951c0e63.tar.xz utils-e5d3fd420ff355d8399de0df2f601772951c0e63.zip |
…
-rw-r--r-- | nix/recv.nix | 2 | ||||
-rw-r--r-- | recv | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/nix/recv.nix b/nix/recv.nix index 6704d41..d24d412 100644 --- a/nix/recv.nix +++ b/nix/recv.nix | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | stdenv.mkDerivation rec { | 5 | stdenv.mkDerivation rec { |
6 | name = "recv-${version}"; | 6 | name = "recv-${version}"; |
7 | version = "0.2"; | 7 | version = "0.3"; |
8 | src = ../recv; | 8 | src = ../recv; |
9 | 9 | ||
10 | phases = [ "buildPhase" "installPhase" ]; | 10 | phases = [ "buildPhase" "installPhase" ]; |
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | set -e | 3 | set -e |
4 | 4 | ||
5 | user="$0" | 5 | user="$1" |
6 | [[ -n "$user" ]] || exit 2 | 6 | [[ -n "$user" ]] || exit 2 |
7 | 7 | ||
8 | recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic" | 8 | recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic" |
9 | [[ -d "$recvDir" ]] || exit 1 | 9 | [[ -d "$recvDir" ]] || exit 1 |
10 | 10 | ||
11 | umask 770 | 11 | umask 027 |
12 | 12 | ||
13 | exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions \ No newline at end of file | 13 | exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions \ No newline at end of file |