mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 05:36:32 +00:00
build.sh: allow overriding image name and version with env vars
This commit is contained in:
parent
9d871ba6dc
commit
95b057a259
@ -36,7 +36,9 @@ ROOT_IMG=$IMG_DIR/root.img
|
|||||||
ROOT_SIZE="180" # MB
|
ROOT_SIZE="180" # MB
|
||||||
|
|
||||||
DISK_SIZE="220" # MB
|
DISK_SIZE="220" # MB
|
||||||
OS_NAME=$(source $IMG_DIR/../../../board/common/overlay/etc/version && echo $os_short_name)
|
|
||||||
|
COMMON_DIR=$(cd $IMG_DIR/../../../board/common; pwd)
|
||||||
|
OS_NAME=$(source $COMMON_DIR/overlay/etc/version && echo $os_short_name)
|
||||||
|
|
||||||
# boot filesystem
|
# boot filesystem
|
||||||
msg "creating boot loop device"
|
msg "creating boot loop device"
|
||||||
|
20
build.sh
20
build.sh
@ -16,12 +16,28 @@ board=$1
|
|||||||
target=${*:2}
|
target=${*:2}
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
basedir=$(pwd)
|
basedir=$(pwd)
|
||||||
osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name)
|
|
||||||
osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version)
|
|
||||||
gzip=$(which pigz || which gzip)
|
gzip=$(which pigz || which gzip)
|
||||||
|
|
||||||
|
# extra environment from local file
|
||||||
test -f $basedir/.build-env && source $basedir/.build-env
|
test -f $basedir/.build-env && source $basedir/.build-env
|
||||||
|
|
||||||
|
# OS name
|
||||||
|
|
||||||
|
if [ -n "$THINGOS_NAME" ]; then
|
||||||
|
osname=$THINGOS_NAME
|
||||||
|
else
|
||||||
|
osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS version
|
||||||
|
if [ -n "$THINGOS_VERSION" ]; then
|
||||||
|
osversion=$THINGOS_VERSION
|
||||||
|
else
|
||||||
|
osversion=$(source $basedir/board/common/overlay/etc/version && echo $os_version)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# when the special "all" keyword is used for board,
|
||||||
|
# all boards are processed, in turn
|
||||||
if [ "$board" == "all" ]; then
|
if [ "$board" == "all" ]; then
|
||||||
boards=$(ls $basedir/configs/*_defconfig | grep -v initramfs | grep -oE '\w+_defconfig$' | cut -d '_' -f 1)
|
boards=$(ls $basedir/configs/*_defconfig | grep -v initramfs | grep -oE '\w+_defconfig$' | cut -d '_' -f 1)
|
||||||
for b in $boards; do
|
for b in $boards; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user