Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions distribute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -666,13 +666,23 @@ function run_get_packages() {
done
}

function envfn() {
envsave=$(mktemp)
envrestore=$(mktemp)
set > $envsave
$1
set > $envrestore
eval $(grep -v -F -f$envrestore $envsave)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't there be a space between:

-f $envrestore

rm -f $envsave $envrestore
}

function run_prebuild() {
info "Run prebuild"
cd $BUILD_PATH
for module in $MODULES; do
fn=$(echo prebuild_$module)
debug "Call $fn"
$fn
envfn $fn
done
}

Expand Down Expand Up @@ -707,7 +717,7 @@ function run_build() {
if [ "X$DO_BUILD" == "X1" ] || [ ! -f "$MARKER_FN" ]; then
debug "Call $fn"
rm -f "$MARKER_FN"
$fn
envfn $fn
touch "$MARKER_FN"
else
debug "Skipped $fn"
Expand All @@ -721,7 +731,7 @@ function run_postbuild() {
for module in $MODULES; do
fn=$(echo postbuild_$module)
debug "Call $fn"
$fn
envfn $fn
done
}

Expand Down