summaryrefslogtreecommitdiff
path: root/scripts/build_packages.sh
blob: 915957f5188d0b21b9929dbaa9df717bd80dbb61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

set -e

# 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
for pkg in "${packages[@]}"; do
    cd "$pkg"
    # Build the package using debuild
    debuild -b -us -uc
    cd ..
done

# Copy built packages to the output directory
mkdir -p "$WORKDIR/output"
cp ../*.deb "$WORKDIR/output"