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}/*