From 100e90272c184628f6e8b2466515896729b562b1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 13 Aug 2013 21:04:08 +0000 Subject: [PATCH] * Idem for the Nixpkgs channel. git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@34756 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb --- mirror-nixpkgs.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mirror-nixpkgs.sh b/mirror-nixpkgs.sh index 06070f3..db20a80 100755 --- a/mirror-nixpkgs.sh +++ b/mirror-nixpkgs.sh @@ -1,35 +1,35 @@ #! /bin/sh -e -viewUrl=http://hydra.nixos.org/view/nixpkgs/unstable/latest-finished +releaseUrl=http://hydra.nixos.org/job/nixpkgs/trunk/unstable/latest-finished releasesDir=/data/releases/nixpkgs channelsDir=/data/releases/channels channelName=nixpkgs-unstable curl="curl --silent --show-error --fail" -url=$($curl --head $viewUrl | sed 's/Location: \(.*\)\r/\1/; t; d') -if [ -z "$url" ]; then exit 1; fi +json=$($curl -L -H 'Accept: application/json' $releaseUrl) -echo "View page is $url" +releaseId=$(echo "$json" | json id) +if [ -z "$releaseId" ]; then echo "Failed to get release id"; exit 1; fi -release=$($curl $url | sed 's|.*

.*View \(.*\) $tmpDir/src-url - perl -w ./mirror-channel.pl "$url/eval/channel" "$tmpDir" \ + perl -w ./mirror-channel.pl "$url/channel" "$tmpDir" \ nix-cache http://cache.nixos.org \ - /data/releases/patches/all-patches "$url/tarball/download/4" + /data/releases/patches/all-patches "$url/job/tarball/download/4" mv $tmpDir $releaseDir fi