nixpkgs/nix-dist/build+upload.sh
Eelco Dolstra 1bc488563d * Automatic generation and uploading of Nix source distributions
and manuals.

svn path=/nixpkgs/trunk/; revision=546
2003-11-25 18:04:28 +00:00

22 lines
665 B
Bash
Executable file

#! /bin/sh
url="https://svn.cs.uu.nl:12443/repos/trace/nix/trunk/"
if ! rev=$(curl --silent -k https://svn.cs.uu.nl:12443/repos/trace/nix/trunk/ \
| grep '<h2>Revision' \
| sed 's/.*Revision \(.*\):.*/\1/'); \
then exit 1; fi
echo $rev > head-revision.nix
if ! storeexpr=$(nix-instantiate do-it.nix); then exit 1; fi
if ! nix-store -r "$storeexpr" > /dev/null; then exit 1; fi
if ! outpath=$(nix-store -qn "$storeexpr"); then exit 1; fi
uploader="http://losser.st-lab.cs.uu.nl/~eelco/cgi-bin/upload.pl/"
curl --silent -T "$outpath/manual.html" "$uploader" > /dev/null || exit 1
curl --silent -T "$outpath"/nix-*.tar.bz2 "$uploader" > /dev/null || exit 1