mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 21:26:36 +00:00
build.sh: use /etc/version when naming the release file
This commit is contained in:
parent
8bf88eb572
commit
67c7305923
8
build.sh
8
build.sh
@ -12,6 +12,7 @@ target=${*:2}
|
|||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
basedir=$(pwd)
|
basedir=$(pwd)
|
||||||
osname=$(source $basedir/board/common/overlay/etc/version && echo $os_short_name)
|
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)
|
||||||
|
|
||||||
if [ "$board" == "all" ]; then
|
if [ "$board" == "all" ]; then
|
||||||
@ -44,10 +45,9 @@ if [ "$target" == "mkimage" ]; then
|
|||||||
elif [ "$target" == "mkrelease" ]; then
|
elif [ "$target" == "mkrelease" ]; then
|
||||||
$boarddir/mkimage.sh
|
$boarddir/mkimage.sh
|
||||||
cp $outputdir/images/$osname-$board.img $basedir
|
cp $outputdir/images/$osname-$board.img $basedir
|
||||||
date=$(date +%Y%m%d)
|
mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img
|
||||||
mv $basedir/$osname-$board.img $basedir/$osname-$board-$date.img
|
rm -f $basedir/$osname-$board-$osversion.img.gz
|
||||||
rm -f $basedir/$osname-$board-$date.img.gz
|
$gzip $basedir/$osname-$board-$osversion.img
|
||||||
$gzip $basedir/$osname-$board-$date.img
|
|
||||||
elif [ -n "$target" ]; then
|
elif [ -n "$target" ]; then
|
||||||
make O=$outputdir $target
|
make O=$outputdir $target
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user