Commit de295f60 authored by Diego Giovane Pasqualin's avatar Diego Giovane Pasqualin
Browse files

build_package.sh: Allow creation of {pre,post} build scripts

Every package can now have a {pre,post}build script, which are files names
{pre,post}build, located inside the package root directory (eg.
le-conf/prebuild). If these files are executable, they will be called before
and after the build process.

prebuild is useful for compiling stuff, and postbuild to cleaning.
parent f0009fd6
......@@ -90,5 +90,27 @@ if ! mkdir -p $PACKAGESDEST; then
exit 3
fi
createPackage "$PKG" "$KIND"
exit $?
prebuild="$REPOROOT/$PKG/prebuild"
postbuild="$REPOROOT/$PKG/postbuild"
if test -x "$prebuild"; then
echo "Running prebuild script..."
if ! $prebuild; then
echo "ERROR while running prebuild script."
exit 4
fi
fi
if ! createPackage "$PKG" "$KIND"; then
echo "ERROR while building package"
exit 5
fi
if test -x "$postbuild"; then
echo "Running postbuild script..."
if ! $postbuild; then
echo "ERROR while running postbuild script."
exit 6
fi
fi
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment