From 94bc8a86dcb70a5c0ee29cdab91a9ad0f739be9d Mon Sep 17 00:00:00 2001 From: Roberto Berto Date: Sat, 8 Jun 2024 17:21:57 -0300 Subject: build .deb packages using docker --- scripts/build_packages.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/build_packages.sh b/scripts/build_packages.sh index 3141a32..915957f 100644 --- a/scripts/build_packages.sh +++ b/scripts/build_packages.sh @@ -2,22 +2,27 @@ set -e -# packages to build -packages=("keepalived" "ethtool") +# Load environment variables from .env file +source .env +# Define the working directory WORKDIR=$(pwd) +# Clone the VyOS repository git clone https://github.com/vyos/vyos-build.git cd vyos-build/packages +# Convert the comma-separated package list into an array +IFS=',' read -r -a packages <<< "$PACKAGE_LIST" -# build each package +# Build each package for pkg in "${packages[@]}"; do cd "$pkg" + # Build the package using debuild debuild -b -us -uc cd .. done -# copy the packages to the output directory +# Copy built packages to the output directory mkdir -p "$WORKDIR/output" cp ../*.deb "$WORKDIR/output" -- cgit v1.2.3