···1-source $stdenv/setup
2-3-sources_=($sources)
4-targets_=($targets)
5-6-objects=($objects)
7-symlinks=($symlinks)
8-9-10# Remove the initial slash from a path, since genisofs likes it that way.
11stripSlash() {
12 res="$1"
···35 # The -boot-info-table option modifies the $bootImage file, so
36 # find it in `contents' and make a copy of it (since the original
37 # is read-only in the Nix store...).
38- for ((i = 0; i < ${#targets_[@]}; i++)); do
39- stripSlash "${targets_[$i]}"
40 if test "$res" = "$bootImage"; then
41- echo "copying the boot image ${sources_[$i]}"
42- cp "${sources_[$i]}" boot.img
43 chmod u+w boot.img
44- sources_[$i]=boot.img
45 fi
46 done
47···666768# Add the individual files.
69-for ((i = 0; i < ${#targets_[@]}; i++)); do
70- stripSlash "${targets_[$i]}"
71- addPath "$res" "${sources_[$i]}"
72done
7374
···0000000001# Remove the initial slash from a path, since genisofs likes it that way.
2stripSlash() {
3 res="$1"
···26 # The -boot-info-table option modifies the $bootImage file, so
27 # find it in `contents' and make a copy of it (since the original
28 # is read-only in the Nix store...).
29+ for ((i = 0; i < ${#targets[@]}; i++)); do
30+ stripSlash "${targets[$i]}"
31 if test "$res" = "$bootImage"; then
32+ echo "copying the boot image ${sources[$i]}"
33+ cp "${sources[$i]}" boot.img
34 chmod u+w boot.img
35+ sources[$i]=boot.img
36 fi
37 done
38···575859# Add the individual files.
60+for ((i = 0; i < ${#targets[@]}; i++)); do
61+ stripSlash "${targets[$i]}"
62+ addPath "$res" "${sources[$i]}"
63done
6465