mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
build.sh tweaks
This commit is contained in:
parent
5b9dc6adb4
commit
5a544a2f62
5
build.sh
5
build.sh
@ -48,10 +48,11 @@ elif [ "$target" == "mkrelease" ]; then
|
|||||||
mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img
|
mv $basedir/$osname-$board.img $basedir/$osname-$board-$osversion.img
|
||||||
rm -f $basedir/$osname-$board-$osversion.img.gz
|
rm -f $basedir/$osname-$board-$osversion.img.gz
|
||||||
$gzip $basedir/$osname-$board-$osversion.img
|
$gzip $basedir/$osname-$board-$osversion.img
|
||||||
|
echo "your image is ready at $basedir/$osname-$board-$osversion.img.gz"
|
||||||
elif [ -n "$target" ]; then
|
elif [ -n "$target" ]; then
|
||||||
make O=$outputdir $target
|
make O=$outputdir $target
|
||||||
else
|
else
|
||||||
make O=$outputdir
|
make O=$outputdir all
|
||||||
test -x $boarddir/mkimage.sh && $boarddir/mkimage.sh
|
echo "build successful"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage: $0 [options...]" 1>&2
|
echo "Usage: $0 [options...]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Available options:"
|
echo "Available options:"
|
||||||
echo " <-i image_file> - indicates the path to the image file (e.g. -i /home/user/Download/file.img.gz)"
|
echo " <-i image_file> - indicates the path to the image file (e.g. -i /home/user/Download/file.img.gz)"
|
||||||
@ -14,7 +14,7 @@ function usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
usage
|
usage 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(id -u) -ne 0 ]]; then echo "please run as root"; exit 1; fi
|
if [[ $(id -u) -ne 0 ]]; then echo "please run as root"; exit 1; fi
|
||||||
@ -51,13 +51,13 @@ while getopts "a:d:f:h:i:lm:n:o:p:s:w" o; do
|
|||||||
DNS=${S_IP[2]}
|
DNS=${S_IP[2]}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage 1>&2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$SDCARD_DEV" ] || [ -z "$DISK_IMG" ]; then
|
if [ -z "$SDCARD_DEV" ] || [ -z "$DISK_IMG" ]; then
|
||||||
usage
|
usage 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function cleanup {
|
function cleanup {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user