mirror of
https://github.com/cusspvz/openwrt-builder.docker
synced 2025-07-11 08:28:35 +00:00
23 lines
577 B
Bash
23 lines
577 B
Bash
#!/bin/bash
|
||
|
||
PROFILE=${PROFILE}
|
||
PACKAGES=${PACKAGES}
|
||
PATH_SRC=/src
|
||
PATH_REPOSITORIES=/repositories
|
||
PATH_OVERLAY=/overlay
|
||
PATH_OUTPUT=/output
|
||
CUSTOM_REPOSITORIES=$(ls $PATH_REPOSITORIES)
|
||
CPUS=${CPUS:-2}
|
||
CLEAN=${CLEAN:-0}
|
||
|
||
## HANDLE REPOSITORYS
|
||
cp $PATH_SRC/repositories.conf $PATH_SRC/repositories.conf.default
|
||
for CUSTOM_REPOSITORY in $CUSTOM_REPOSITORIES; do
|
||
echo "src ${CUSTOM_REPOSITORY} ${PATH_REPOSITORIES}/${CUSTOM_REPOSITORY}" >> $PATH_SRC/repositories.conf
|
||
done;
|
||
|
||
# Build image
|
||
make image \
|
||
PACKAGES="$PACKAGES" \
|
||
FILES="$PATH_OVERLAY" \
|
||
BIN_DIR="$PATH_OUTPUT" |