forked from the-distro/channel-scripts
* Idem.
git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@34854 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb
This commit is contained in:
parent
3ac156edb9
commit
48ddb3eec8
|
@ -11,20 +11,22 @@ release=$(basename $releaseDir)
|
||||||
# Generate a .htaccess with some symbolic redirects to the latest ISOs.
|
# Generate a .htaccess with some symbolic redirects to the latest ISOs.
|
||||||
htaccess=/data/releases/nixos/.htaccess
|
htaccess=/data/releases/nixos/.htaccess
|
||||||
|
|
||||||
baseURL="http://releases.nixos.org/nixos/$version/$release"
|
link() {
|
||||||
echo "Redirect /nixos/latest $baseURL" > $htaccess.tmp
|
local name="$1"
|
||||||
fn=$(cd $releaseDir && echo nixos-minimal-*-i686-linux.iso)
|
local wildcard="$2"
|
||||||
echo "Redirect /nixos/latest-iso-minimal-i686-linux $baseURL/$fn" >> $htaccess.tmp
|
fn=$(cd $releaseDir && echo $wildcard)
|
||||||
fn=$(cd $releaseDir && echo nixos-minimal-*-x86_64-linux.iso)
|
echo "Redirect /releases/nixos/$name $baseURL/$fn" >> $htaccess.tmp
|
||||||
echo "Redirect /nixos/latest-iso-minimal-x86_64-linux $baseURL/$fn" >> $htaccess.tmp
|
echo "Redirect /releases/nixos/${name}-sha256 $baseURL/${fn}.sha256" >> $htaccess.tmp
|
||||||
fn=$(cd $releaseDir && echo nixos-graphical-*-i686-linux.iso)
|
}
|
||||||
echo "Redirect /nixos/latest-iso-graphical-i686-linux $baseURL/$fn" >> $htaccess.tmp
|
|
||||||
fn=$(cd $releaseDir && echo nixos-graphical-*-x86_64-linux.iso)
|
baseURL="/releases/nixos/$version/$release"
|
||||||
echo "Redirect /nixos/latest-iso-graphical-x86_64-linux $baseURL/$fn" >> $htaccess.tmp
|
echo "Redirect /releases/nixos/latest $baseURL" > $htaccess.tmp
|
||||||
fn=$(cd $releaseDir && echo nixos-*-i686-linux.ova)
|
link latest-iso-minimal-i686-linux "nixos-minimal-*-i686-linux.iso"
|
||||||
echo "Redirect /nixos/latest-ova-i686-linux $baseURL/$fn" >> $htaccess.tmp
|
link latest-iso-minimal-x86_64-linux "nixos-minimal-*-x86_64-linux.iso"
|
||||||
fn=$(cd $releaseDir && echo nixos-*-x86_64-linux.ova)
|
link latest-iso-graphical-i686-linux "nixos-graphical-*-i686-linux.iso"
|
||||||
echo "Redirect /nixos/latest-ova-x86_64-linux $baseURL/$fn" >> $htaccess.tmp
|
link latest-iso-graphical-x86_64-linux "nixos-graphical-*-x86_64-linux.iso"
|
||||||
|
link latest-ova-i686-linux "nixos-*-i686-linux.ova"
|
||||||
|
link latest-ova-x86_64-linux "nixos-*-x86_64-linux.ova"
|
||||||
|
|
||||||
mv $htaccess.tmp $htaccess
|
mv $htaccess.tmp $htaccess
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue