forked from lix-project/lix
Added http alternative transport for nix-reduce-build
This commit is contained in:
parent
658816ddc9
commit
b1e321d6ce
|
@ -56,9 +56,18 @@ if test -z "$1" ; then
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
cat needed-paths | while read; do
|
sshHost="${i#ssh://}";
|
||||||
nix-copy-closure --from "$i" --gzip "$REPLY" </dev/null || true;
|
httpHost="${i#http://}";
|
||||||
done;
|
httpsHost="${i#https://}";
|
||||||
|
if [ "$i" != "$sshHost" ]; then
|
||||||
|
cat needed-paths | while read; do
|
||||||
|
nix-copy-closure --from "$sshHost" --gzip "$REPLY" </dev/null || true;
|
||||||
|
done;
|
||||||
|
elif [ "$i" != "$httpHost" ] || [ "$i" != "$httpsHost" ]; then
|
||||||
|
cat needed-paths | while read; do
|
||||||
|
curl -L "$i${REPLY##*/}" | gunzip | nix-store --import;
|
||||||
|
done;
|
||||||
|
fi;
|
||||||
mv needed-paths wanted-paths;
|
mv needed-paths wanted-paths;
|
||||||
cat wanted-paths | xargs nix-store --check-validity --print-invalid > needed-paths;
|
cat wanted-paths | xargs nix-store --check-validity --print-invalid > needed-paths;
|
||||||
echo We still need $(cat needed-paths | wc -l) paths. >&2
|
echo We still need $(cat needed-paths | wc -l) paths. >&2
|
||||||
|
|
Loading…
Reference in a new issue