mirror of
https://github.com/ipetkov/crane.git
synced 2024-12-24 16:03:42 +03:00
Make copyCargoTargetToOutputHook even more lazy
* Instead of always installing the hook but bailing early based on the configuration, we will instead only install the hook if the configuration requests it
This commit is contained in:
parent
ade4ea7137
commit
2730271710
@ -1,10 +1,6 @@
|
||||
copyCargoTargetToOutput() {
|
||||
echo "Executing copyCargoTargetToOutput"
|
||||
|
||||
if [ "1" != "${doCopyTargetToOutput-}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
export SOURCE_DATE_EPOCH=1
|
||||
mkdir -p "${target}"
|
||||
|
||||
@ -22,4 +18,6 @@ copyCargoTargetToOutput() {
|
||||
-c target | @zstd@ -o "${target}/target.tar.zst"
|
||||
}
|
||||
|
||||
postInstallHooks+=(copyCargoTargetToOutput)
|
||||
if [ "1" = "${doCopyTargetToOutput-}" ]; then
|
||||
postInstallHooks+=(copyCargoTargetToOutput)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user