From 58f2a2dc7cc00ee7a55978c81b5a2cfee88c7ede Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 1 Nov 2013 15:56:40 +0000 Subject: [PATCH] * Redirect to latest 13.10 release. git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@34798 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb --- mirror-nixos-stable.sh | 29 +++++++++++++++++++++++++++++ mirror-nixos-unstable.sh | 24 ------------------------ 2 files changed, 29 insertions(+), 24 deletions(-) create mode 100755 mirror-nixos-stable.sh diff --git a/mirror-nixos-stable.sh b/mirror-nixos-stable.sh new file mode 100755 index 0000000..5fcc6ae --- /dev/null +++ b/mirror-nixos-stable.sh @@ -0,0 +1,29 @@ +#! /bin/sh -e + +version="13.10" +releaseDir=$(./mirror-nixos-branch.sh "$version" "release-$version") +echo $releaseDir + +release=$(basename $releaseDir) + +# Generate a .htaccess with some symbolic redirects to the latest ISOs. +htaccess=/data/releases/nixos/.htaccess + +baseURL="http://nixos.org/releases/nixos/$version/$release" +echo "Redirect /releases/nixos/latest $baseURL" > $htaccess.tmp +fn=$(cd $releaseDir && echo nixos-minimal-*-i686-linux.iso) +echo "Redirect /releases/nixos/latest-iso-minimal-i686-linux $baseURL/$fn" >> $htaccess.tmp +fn=$(cd $releaseDir && echo nixos-minimal-*-x86_64-linux.iso) +echo "Redirect /releases/nixos/latest-iso-minimal-x86_64-linux $baseURL/$fn" >> $htaccess.tmp +fn=$(cd $releaseDir && echo nixos-graphical-*-i686-linux.iso) +echo "Redirect /releases/nixos/latest-iso-graphical-i686-linux $baseURL/$fn" >> $htaccess.tmp +fn=$(cd $releaseDir && echo nixos-graphical-*-x86_64-linux.iso) +echo "Redirect /releases/nixos/latest-iso-graphical-x86_64-linux $baseURL/$fn" >> $htaccess.tmp +fn=$(cd $releaseDir && echo nixos-*-i686-linux.ova) +echo "Redirect /releases/nixos/latest-ova-i686-linux $baseURL/$fn" >> $htaccess.tmp +fn=$(cd $releaseDir && echo nixos-*-x86_64-linux.ova) +echo "Redirect /releases/nixos/latest-ova-x86_64-linux $baseURL/$fn" >> $htaccess.tmp + +mv $htaccess.tmp $htaccess + +rsync -av $htaccess hydra-mirror@nixos.org:$htaccess >&2 diff --git a/mirror-nixos-unstable.sh b/mirror-nixos-unstable.sh index 90d777e..faa4657 100755 --- a/mirror-nixos-unstable.sh +++ b/mirror-nixos-unstable.sh @@ -2,27 +2,3 @@ releaseDir=$(./mirror-nixos-branch.sh unstable trunk-combined) echo $releaseDir - -release=$(basename $releaseDir) - -# Generate a .htaccess with some symbolic redirects to the latest ISOs. -htaccess=/data/releases/nixos/.htaccess - -baseURL="http://nixos.org/releases/nixos/unstable/$release" -echo "Redirect /releases/nixos/latest $baseURL" > $htaccess.tmp -fn=$(cd $releaseDir && echo nixos-minimal-*-i686-linux.iso) -echo "Redirect /releases/nixos/latest-iso-minimal-i686-linux $baseURL/$fn" >> $htaccess.tmp -fn=$(cd $releaseDir && echo nixos-minimal-*-x86_64-linux.iso) -echo "Redirect /releases/nixos/latest-iso-minimal-x86_64-linux $baseURL/$fn" >> $htaccess.tmp -fn=$(cd $releaseDir && echo nixos-graphical-*-i686-linux.iso) -echo "Redirect /releases/nixos/latest-iso-graphical-i686-linux $baseURL/$fn" >> $htaccess.tmp -fn=$(cd $releaseDir && echo nixos-graphical-*-x86_64-linux.iso) -echo "Redirect /releases/nixos/latest-iso-graphical-x86_64-linux $baseURL/$fn" >> $htaccess.tmp -fn=$(cd $releaseDir && echo nixos-*-i686-linux.ova) -echo "Redirect /releases/nixos/latest-ova-i686-linux $baseURL/$fn" >> $htaccess.tmp -fn=$(cd $releaseDir && echo nixos-*-x86_64-linux.ova) -echo "Redirect /releases/nixos/latest-ova-x86_64-linux $baseURL/$fn" >> $htaccess.tmp - -mv $htaccess.tmp $htaccess - -rsync -av $htaccess hydra-mirror@nixos.org:$htaccess >&2