crane/pkgs/copyCargoTargetToOutputHook.sh

14 lines
338 B
Bash
Raw Normal View History

2021-12-27 05:06:19 +03:00
copyCargoTargetToOutput() {
echo "Executing copyCargoTargetToOutput"
trap "echo Finished copyCargoTargetToOutput" RETURN
if [ "1" != "${doCopyTarget}" ]; then
return
fi
# Copy the cargo `target` directory to the `target` output
mv "${CARGO_TARGET_DIR:-target}" "${target}"
2021-12-27 05:06:19 +03:00
}
postInstallHooks+=(copyCargoTargetToOutput)