#!/bin/bash
CPWD=`cd $(dirname  $0);pwd`
os_version=`uname -r |awk -F"el" '{print $2}' |awk -F"." '{print $1}'`
kernel_pre_version=`uname -r |awk -F"." '{print $1}'`
kernel_sub_version=`uname -r |awk -F"." '{print $2}'`

cd $CPWD
chmod 777 afulnx_64 afulnx_64_5.14.03.0039_2021
chmod 777 *.ROM
if [[ "${os_version}" = "7" ]];then
	if [[ ${kernel_pre_version} == 4 ]];then
                ./afulnx_64 UZZQ012111.ROM /p /b /n /k /x
	elif [[ ${kernel_pre_version} == 5 ]];then
		if [[ ${kernel_sub_version} == 10 ]];then
                	./afulnx_64_5.14.03.0039_2021 UZZQ012113.ROM /p /b /n /k /x
		fi
	fi
fi
