mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-23 08:22:41 +03:00
22 lines
457 B
Bash
22 lines
457 B
Bash
|
copyCargoTargetToOutput() {
|
||
|
echo "Executing copyCargoTargetToOutput"
|
||
|
trap "echo Finished copyCargoTargetToOutput" RETURN
|
||
|
|
||
|
local target_dir=${CARGO_TARGET_DIR:-target}
|
||
|
|
||
|
if [ "1" != "${doCopyTarget}" ]; then
|
||
|
return
|
||
|
fi
|
||
|
|
||
|
if [ "1" = "${doCopyTargetToSeparateOutput}" ]; then
|
||
|
local dest="${target}"
|
||
|
else
|
||
|
mkdir -p "${out}"
|
||
|
local dest="${out}/target"
|
||
|
fi
|
||
|
|
||
|
mv "${target_dir}" "${dest}"
|
||
|
}
|
||
|
|
||
|
postInstallHooks+=(copyCargoTargetToOutput)
|