We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3fae3b commit 555c1f0Copy full SHA for 555c1f0
pkgs/build-support/fetchdarcs/nix-prefetch-darcs
@@ -140,7 +140,7 @@ if [ -z "$final_path" ]; then
140
# Darcs has a weak hash using the XOR of the patch hashes which is useful
141
# for other scripts
142
# https://darcs.net/Internals/Hashes
143
- weak_hash="$(darcs show repo | grep '^ *Weak Hash:' | cut -d: -f2- | tr -d "[:space:]")"
+ weak_hash="$(darcs show repo | awk '/^[[:space:]]*Weak Hash:/ { sub(/^[[:space:]]*Weak Hash:[[:space:]]*/, "", $0); printf $0 }')"
144
date="$(darcs log --repodir="$tmp_clone/$name" --max-count 1 | awk '/^Date:/ { sub(/^Date:[[:space:]]*/, "", $0); printf $0 }')"
145
date="$(date -u -d "$date" "+%Y-%m-%dT%H:%M:%SZ")"
146
cd - >/dev/null
0 commit comments