#!/bin/sh

if [ "$BTESTING" -ne "0" ]; then
	BOOTLOADER_NAME="$BOOTLOADER"_"$BMAJOR"."$BMINOR"."$BOEM"."$BTESTING".bos
elif [ "$BOEM" -ne "0" ]; then 
	BOOTLOADER_NAME="$BOOTLOADER"_"$BMAJOR"."$BMINOR"."$BOEM".bos
else
	BOOTLOADER_NAME="$BOOTLOADER"_"$BMAJOR"."$BMINOR".bos
fi

[ -f "/tftpboot/noaddversion" ] || mkdir -p /tftpboot/noaddversion
[ -f "/tftpboot/$BOOTLOADER_NAME" ] || cp -a bootloader/"$BOOTLOADER_NAME" /tftpboot/

