From 83aa84be942ad8990ea2ce754ac3e4cfef2d9eb8 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Tue, 11 Oct 2005 10:48:10 +0000 Subject: [PATCH] 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 --- howto | 2 +- make-disk.sh | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/howto b/howto index 3e7f4f0fd9d4..13b8aa3b8bf7 100644 --- a/howto +++ b/howto @@ -8,7 +8,7 @@ NixOS. Install Nix. Checkout nixpkgs from Subversion, as well as nixu. Adapt the 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 diff --git a/make-disk.sh b/make-disk.sh index f8293d9c38a8..6e87f0e488ff 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -3,7 +3,7 @@ # deps is an array declare -a deps -archivesDir=/tmp/arch +archivesDir=$(mktemp -d) manifest=${archivesDir}/MANIFEST nixpkgs=/nixpkgs/trunk/pkgs fill_disk=$archivesDir/scripts/fill-disk.sh @@ -15,13 +15,6 @@ initrd=/tmp/initram.img initdir=${archivesDir}/initdir 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)) 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 chmod -f -R +w ${archivesDir}/* -#rm -rf ${archivesDir}/* +rm -rf ${archivesDir}/*