no longer hardcode the directory where we put our stuff in (previously /tmp/arch), but use mktemp instead, which is a *lot* cleaner. Update documentation accordingly.
svn path=/nixu/trunk/; revision=4047
This commit is contained in:
parent
d04db9e95f
commit
83aa84be94
2
howto
2
howto
|
@ -8,7 +8,7 @@ NixOS.
|
||||||
|
|
||||||
Install Nix. Checkout nixpkgs from Subversion, as well as nixu. Adapt the
|
Install Nix. Checkout nixpkgs from Subversion, as well as nixu. Adapt the
|
||||||
scripts in nixu to reflect the location of nixpkgs (default /nixpkgs).
|
scripts in nixu to reflect the location of nixpkgs (default /nixpkgs).
|
||||||
Make a directory /tmp/arch. Run ./make-disk.sh. Wait.
|
Make sure mktemp is installed. Run ./make-disk.sh. Wait.
|
||||||
|
|
||||||
Burning
|
Burning
|
||||||
|
|
||||||
|
|
11
make-disk.sh
11
make-disk.sh
|
@ -3,7 +3,7 @@
|
||||||
# deps is an array
|
# deps is an array
|
||||||
declare -a deps
|
declare -a deps
|
||||||
|
|
||||||
archivesDir=/tmp/arch
|
archivesDir=$(mktemp -d)
|
||||||
manifest=${archivesDir}/MANIFEST
|
manifest=${archivesDir}/MANIFEST
|
||||||
nixpkgs=/nixpkgs/trunk/pkgs
|
nixpkgs=/nixpkgs/trunk/pkgs
|
||||||
fill_disk=$archivesDir/scripts/fill-disk.sh
|
fill_disk=$archivesDir/scripts/fill-disk.sh
|
||||||
|
@ -15,13 +15,6 @@ initrd=/tmp/initram.img
|
||||||
initdir=${archivesDir}/initdir
|
initdir=${archivesDir}/initdir
|
||||||
initscript=$archivesDir/scripts/init.sh
|
initscript=$archivesDir/scripts/init.sh
|
||||||
|
|
||||||
echo cleaning old build
|
|
||||||
|
|
||||||
# keep chmod happy
|
|
||||||
touch ${archivesDir}/blah
|
|
||||||
chmod -f -R +w ${archivesDir}/*
|
|
||||||
rm -rf ${archivesDir}/*
|
|
||||||
|
|
||||||
NIX_CMD_PATH=$(dirname $(which nix-store))
|
NIX_CMD_PATH=$(dirname $(which nix-store))
|
||||||
|
|
||||||
storeExpr=$($NIX_CMD_PATH/nix-store -qR $($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -)))
|
storeExpr=$($NIX_CMD_PATH/nix-store -qR $($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -)))
|
||||||
|
@ -250,4 +243,4 @@ mkisofs -rJ -o ${bootiso} -b isolinux/isolinux.bin -c isolinux/boot.cat \
|
||||||
echo cleaning up
|
echo cleaning up
|
||||||
|
|
||||||
chmod -f -R +w ${archivesDir}/*
|
chmod -f -R +w ${archivesDir}/*
|
||||||
#rm -rf ${archivesDir}/*
|
rm -rf ${archivesDir}/*
|
||||||
|
|
Loading…
Reference in New Issue