diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-01-23 14:34:44 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-01-23 14:34:44 +0000 |
commit | 903a64c87dffab61bdc15e7aed4127585635ca84 (patch) | |
tree | 1f1bf7125958c0732586d15d749f8a5bd0987ddb /helpers/make-iso9660-image.sh | |
parent | 668c146e33291e933ccfb19fd39fab9cd2b7900d (diff) | |
download | nixpkgs-903a64c87dffab61bdc15e7aed4127585635ca84.tar nixpkgs-903a64c87dffab61bdc15e7aed4127585635ca84.tar.gz nixpkgs-903a64c87dffab61bdc15e7aed4127585635ca84.tar.bz2 nixpkgs-903a64c87dffab61bdc15e7aed4127585635ca84.tar.lz nixpkgs-903a64c87dffab61bdc15e7aed4127585635ca84.tar.xz nixpkgs-903a64c87dffab61bdc15e7aed4127585635ca84.tar.zst nixpkgs-903a64c87dffab61bdc15e7aed4127585635ca84.zip |
* Some things are best done in Perl.
svn path=/nixos/trunk/; revision=7773
Diffstat (limited to 'helpers/make-iso9660-image.sh')
-rw-r--r-- | helpers/make-iso9660-image.sh | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/helpers/make-iso9660-image.sh b/helpers/make-iso9660-image.sh index 1fa04aef7b2..6ce205adc2a 100644 --- a/helpers/make-iso9660-image.sh +++ b/helpers/make-iso9660-image.sh @@ -12,28 +12,24 @@ if test -n "$bootable"; then fi +# Add the individual files. graftList= for ((i = 0; i < ${#targets_[@]}; i++)); do graftList="$graftList ${targets_[$i]}=$(readlink -f ${sources_[$i]})" done +# Add the closures of the top-level store objects. +storePaths=$(perl $pathsFromGraph closure-*) +for i in $storePaths; do + graftList="$graftList ${i:1}=$i" +done + + +# Add symlinks to the top-level store objects. for ((n = 0; n < ${#objects[*]}; n++)); do object=${objects[$n]} symlink=${symlinks[$n]} - - # Get the paths in the closure of `object'. - closure=closure-$(basename $symlink) - if ! test -e $closure; then - echo 'Your Nix installation is too old! Upgrade to nix-0.11pre7038 or newer.' - exit 1 - fi - storePaths=$($SHELL $pathsFromGraph $closure) - - for i in $storePaths; do - graftList="$graftList ${i:1}=$i" - done - if test "$symlink" != "none"; then mkdir -p $(dirname ./$symlink) ln -s $object ./$symlink |