* Better installation: make directories, create database.

* Fixed the register script.
This commit is contained in:
Eelco Dolstra 2003-04-06 22:19:26 +00:00
parent 2eea8832f0
commit 814b256da4
3 changed files with 18 additions and 10 deletions

View File

@ -10,5 +10,6 @@ AC_CANONICAL_HOST
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
AC_CONFIG_FILES(Makefile src/Makefile src/nix-instantiate) AC_CONFIG_FILES([Makefile src/Makefile])
AC_CONFIG_FILES([src/nix-instantiate], [chmod +x src/nix-instantiate])
AC_OUTPUT AC_OUTPUT

View File

@ -3,3 +3,10 @@ bin_PROGRAMS = nix
nix_SOURCES = nix.cc md5.c nix_SOURCES = nix.cc md5.c
nix_CXXFLAGS = -DSYSTEM=\"@host@\" nix_CXXFLAGS = -DSYSTEM=\"@host@\"
nix_LDADD = -ldb_cxx-4 -lATerm nix_LDADD = -ldb_cxx-4 -lATerm
install-data-local:
$(INSTALL) -d $(localstatedir)/nix
$(INSTALL) -d $(localstatedir)/nix/descriptors
$(INSTALL) -d $(localstatedir)/nix/sources
$(INSTALL) -d $(prefix)/pkg
$(bindir)/nix init

View File

@ -1,19 +1,19 @@
#! /bin/sh #! /bin/sh
mkdir -p $NIX/db if test -z "$NIX"; then NIX=/nix; fi
mkdir -p $NIX/pkg
mkdir -p $NIX/descr
mkdir -p $NIX/netcache
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; exit 1;
fi fi
for i in $NIX/netcache/*; do nix regfile $i; done rm -f build/*~
for i in build/*; do nix regfile $i; done cp -p build/* $NIX/var/nix/sources
for i in $NIX/descr/*; do
for i in $NIX/var/nix/sources/*; do nix regfile $i; done
for i in $NIX/var/nix/descriptors/*; do
md5sum $i md5sum $i
nix regfile $i nix regfile $i
done done