···
if test "${res:0:1}" = /; then res=${res:1}; fi
16
+
# Escape potential equal signs (=) with backslash (\=)
18
+
echo "$1" | sed -e 's/\\/\\\\/g' -e 's/=/\\=/g'
21
+
# Queues an file/directory to be placed on the ISO.
22
+
# An entry consists of a local source path (2) and
23
+
# a destination path on the ISO (1).
27
+
echo "$(escapeEquals "$target")=$(escapeEquals "$source")" >> pathlist
stripSlash "$bootImage"; bootImage="$res"
···
# Add the individual files.
for ((i = 0; i < ${#targets_[@]}; i++)); do
stripSlash "${targets_[$i]}"
56
-
echo "$res=${sources_[$i]}" >> pathlist
70
+
addPath "$res" "${sources_[$i]}"
# Add the closures of the top-level store objects.
storePaths=$(perl $pathsFromGraph closure-*)
63
-
echo "${i:1}=$i" >> pathlist
77
+
addPath "${i:1}" "$i"
···
if [ -n "$object" ]; then
printRegistration=1 perl $pathsFromGraph closure-* > nix-path-registration
71
-
echo "nix-path-registration=nix-path-registration" >> pathlist
85
+
addPath "nix-path-registration" "nix-path-registration"
···
if test "$symlink" != "none"; then
mkdir -p $(dirname ./$symlink)
82
-
echo "$symlink=./$symlink" >> pathlist
96
+
addPath "$symlink" "./$symlink"
86
-
# Escape filenames that contain '='.
87
-
# TODO: Handle this properly. This fails for filenames
88
-
# that contain multiple '=' symbols.
89
-
cat pathlist | sed -e 's/=\(.*\)=\(.*\)=/\\=\1=\2\\=/' | tee pathlist.safer
···
106
-
-path-list pathlist.safer
114
+
-path-list pathlist
--sort-weight 1 /isolinux" # Make sure isolinux is near the beginning of the ISO