lol

installShellFiles: add new function installBin

+24
+24
pkgs/by-name/in/installShellFiles/setup-hook.sh
··· 233 233 fi 234 234 return $retval 235 235 } 236 + 237 + # installBin <path> [...<path>] 238 + # 239 + # Install each argument to $outputBin 240 + installBin() { 241 + local path 242 + for path in "$@"; do 243 + if (( "${NIX_DEBUG:-0}" >= 1 )); then 244 + echo "installBin: installing $path" 245 + fi 246 + if test -z "$path"; then 247 + echo "installBin: error: path cannot be empty" >&2 248 + return 1 249 + fi 250 + local basename 251 + # use stripHash in case it's a nix store path 252 + basename=$(stripHash "$path") 253 + 254 + local outRoot 255 + outRoot=${!outputBin:?} 256 + 257 + install -D --mode=755 --no-target-directory "$path" "${outRoot}/bin/$basename" || return 258 + done 259 + }