mirror of
https://github.com/pygos/build.git
synced 2024-11-18 09:19:46 +01:00
297b0a3254
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
34 lines
837 B
Text
Executable file
34 lines
837 B
Text
Executable file
build() {
|
|
local SOURCE="$1"
|
|
local BUILD="$2"
|
|
local DEPLOY="$3"
|
|
|
|
# copy output of immediate dependencies
|
|
mkdir -p "$BUILD/boot"
|
|
|
|
while read pkgname; do
|
|
if [ -e "$PKGDEPLOYDIR/$pkgname" ]; then
|
|
cp -ru ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD/boot"
|
|
fi
|
|
done < "$SCRIPTDIR/pkg/release-${CFG}/depends"
|
|
|
|
# copy files from this package
|
|
cp "$SCRIPTDIR/pkg/release-${CFG}/cmdline.txt" "$BUILD/boot"
|
|
cp "$SCRIPTDIR/pkg/release-${CFG}/install.sh" "$BUILD"
|
|
cp "$SCRIPTDIR/pkg/release-${CFG}/genimage.sh" "$BUILD"
|
|
|
|
# substitute file names in scripts
|
|
local rootfs_image="rootfs.img"
|
|
|
|
sed -i 's/ROOTFSFILE/'$rootfs_image'/g' "$BUILD/boot/cmdline.txt"
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local BUILD="$2"
|
|
local DEPLOY="$3"
|
|
|
|
pushd "$PKGBUILDDIR" > /dev/null
|
|
tar czf "${DEPLOY}/release-${CFG}.tar.gz" "release-${CFG}"
|
|
popd > /dev/null
|
|
}
|