···233233 fi
234234 return $retval
235235}
236236+237237+# installBin <path> [...<path>]
238238+#
239239+# Install each argument to $outputBin
240240+installBin() {
241241+ local path
242242+ for path in "$@"; do
243243+ if (( "${NIX_DEBUG:-0}" >= 1 )); then
244244+ echo "installBin: installing $path"
245245+ fi
246246+ if test -z "$path"; then
247247+ echo "installBin: error: path cannot be empty" >&2
248248+ return 1
249249+ fi
250250+ local basename
251251+ # use stripHash in case it's a nix store path
252252+ basename=$(stripHash "$path")
253253+254254+ local outRoot
255255+ outRoot=${!outputBin:?}
256256+257257+ install -D --mode=755 --no-target-directory "$path" "${outRoot}/bin/$basename" || return
258258+ done
259259+}