2007-02-06 15:13:12 +01:00
|
|
|
#! @shell@ -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# Obtain Subversion.
|
2007-02-08 20:53:21 +01:00
|
|
|
if test -z "$(type -tp svn)"; then
|
2008-01-07 23:24:00 +01:00
|
|
|
#nix-channel --add http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable
|
|
|
|
#nix-channel --update
|
2007-02-08 20:53:21 +01:00
|
|
|
nix-env -i subversion
|
|
|
|
fi
|
2007-02-06 15:13:12 +01:00
|
|
|
|
|
|
|
cd /etc/nixos
|
|
|
|
|
|
|
|
# Move any old nixos or nixpkgs directories out of the way.
|
|
|
|
backupTimestamp=$(date "+%Y%m%d%H%M%S")
|
|
|
|
|
|
|
|
if test -e nixos -a ! -e nixos/.svn; then
|
|
|
|
mv nixos nixos-$backupTimestamp
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -e nixpkgs -a ! -e nixpkgs/.svn; then
|
|
|
|
mv nixpkgs nixpkgs-$backupTimestamp
|
|
|
|
fi
|
|
|
|
|
2007-11-05 09:33:12 +01:00
|
|
|
if test -e services -a ! -e services/.svn; then
|
2007-06-18 22:33:30 +02:00
|
|
|
mv nixos/services services-$backupTimestamp
|
|
|
|
fi
|
|
|
|
|
2007-02-06 15:13:12 +01:00
|
|
|
# Check out the NixOS and Nixpkgs sources.
|
|
|
|
svn co https://svn.cs.uu.nl:12443/repos/trace/nixos/trunk nixos
|
|
|
|
svn co https://svn.cs.uu.nl:12443/repos/trace/nixpkgs/trunk nixpkgs
|
2007-11-05 09:33:12 +01:00
|
|
|
svn co https://svn.cs.uu.nl:12443/repos/trace/services/trunk services
|
2007-11-05 09:54:30 +01:00
|
|
|
ln -sfn ../services nixos/services
|
2007-02-06 15:13:12 +01:00
|
|
|
|
|
|
|
# A few symlink.
|
|
|
|
ln -sfn ../nixpkgs/pkgs nixos/pkgs
|
|
|
|
ln -sfn nixpkgs/pkgs/top-level/all-packages.nix install-source.nix
|