From 3d459917c29770738ce2376b983a552e315dfd32 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 6 Apr 2003 22:19:26 +0000 Subject: [PATCH] * Better installation: make directories, create database. * Fixed the register script. svn path=/nix/trunk/test/; revision=34 --- register | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/register b/register index e03296495a92..57fe5b6c0d01 100755 --- a/register +++ b/register @@ -1,19 +1,19 @@ #! /bin/sh -mkdir -p $NIX/db -mkdir -p $NIX/pkg -mkdir -p $NIX/descr -mkdir -p $NIX/netcache +if test -z "$NIX"; then NIX=/nix; fi -nix init +echo target $NIX -if ! nix-instantiate $NIX/descr $NIX/netcache tmpl/*.nix; then +if ! nix-instantiate $NIX/var/nix/descriptors $NIX/var/nix/sources tmpl/*.nix; then exit 1; fi -for i in $NIX/netcache/*; do nix regfile $i; done -for i in build/*; do nix regfile $i; done -for i in $NIX/descr/*; do +rm -f build/*~ +cp -p build/* $NIX/var/nix/sources + +for i in $NIX/var/nix/sources/*; do nix regfile $i; done + +for i in $NIX/var/nix/descriptors/*; do md5sum $i nix regfile $i done