forked from the-distro/channel-scripts
* Put the Nixpkgs and NixOS manuals in the channel.
git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@34761 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb
This commit is contained in:
parent
b20366e0f9
commit
6f4829b73b
|
@ -136,7 +136,7 @@ sub mirrorStorePath {
|
|||
my $ext;
|
||||
|
||||
if (isValidPath($storePath) && queryPathHash16($storePath) eq $nar->{narHash}) {
|
||||
print STDERR "copying $storePath instead of downloading $nar->{url}\n";
|
||||
print STDERR "copying $storePath\n";
|
||||
|
||||
# Verify that $storePath hasn't been corrupted and compress it at the same time.
|
||||
$ext = "xz";
|
||||
|
|
|
@ -18,10 +18,10 @@ if [ -z "$release" ]; then echo "Failed to get release"; exit 1; fi
|
|||
url=$($curl --head http://hydra.nixos.org/build/$releaseId/eval | sed 's/Location: \(.*\)\r/\1/; t; d')
|
||||
if [ -z "$url" ]; then exit 1; fi
|
||||
|
||||
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’"
|
||||
|
||||
releaseDir=$releasesDir/$release
|
||||
|
||||
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’, dir is ‘$releaseDir’"
|
||||
|
||||
if [ -d $releaseDir ]; then
|
||||
echo "release already exists"
|
||||
else
|
||||
|
@ -30,6 +30,14 @@ else
|
|||
|
||||
echo $url > $tmpDir/src-url
|
||||
|
||||
# Copy the manual.
|
||||
drvpath=$(curl -H 'Accept: application/json' -L $url/job/nixos.manual | json drvpath)
|
||||
if [ -z "$drvpath" ]; then exit 1; fi
|
||||
outpath=$(nix-store -r $drvpath)
|
||||
cp -rd $outpath/share/doc/nixos $tmpDir/manual
|
||||
chmod -R u+w $tmpDir/manual
|
||||
ln -s manual.html $tmpDir/manual/index.html
|
||||
|
||||
$wget --directory=$tmpDir $url/job/nixos.iso_minimal.i686-linux/download
|
||||
$wget --directory=$tmpDir $url/job/nixos.iso_minimal.x86_64-linux/download
|
||||
$wget --directory=$tmpDir $url/job/nixos.iso_graphical.i686-linux/download
|
||||
|
|
|
@ -17,10 +17,10 @@ if [ -z "$release" ]; then echo "Failed to get release"; exit 1; fi
|
|||
url=$($curl --head http://hydra.nixos.org/build/$releaseId/eval | sed 's/Location: \(.*\)\r/\1/; t; d')
|
||||
if [ -z "$url" ]; then exit 1; fi
|
||||
|
||||
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’"
|
||||
|
||||
releaseDir=$releasesDir/$release
|
||||
|
||||
echo "release is ‘$release’ (build $releaseId), eval is ‘$url’, dir is ‘$releaseDir’"
|
||||
|
||||
if [ -d $releaseDir ]; then
|
||||
echo "release already exists"
|
||||
else
|
||||
|
@ -33,6 +33,12 @@ else
|
|||
nix-cache http://cache.nixos.org \
|
||||
/data/releases/patches/all-patches "$url/job/tarball/download/4"
|
||||
|
||||
# Extract the manual.
|
||||
mkdir $tmpDir/manual
|
||||
tar xf $tmpDir/nixexprs.tar.xz --strip-components=2 -C $tmpDir/manual \
|
||||
--wildcards '*/doc' --exclude '*.xml' --exclude '*.xsl' --exclude '*.txt' --exclude 'Makefile'
|
||||
ln -s manual.html $tmpDir/manual/index.html
|
||||
|
||||
mv $tmpDir $releaseDir
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue