From 7f7470316461eb4463c40a9489906edbca92f1ca Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Tue, 10 Apr 2018 19:06:30 +0200 Subject: [COMMUNITY] improve install driver script * if the driver source directoy (${_src_full}) have more than 1 driver files, the script will failed. ([ ! -f file*.zip ] can match only one file). Change-Id: I5d7df198f902787ce0b332f9b87769e1e683694e Signed-off-by: Ronan Le Martret --- .../sample/copyscript/copy_evaproprietary_softwares.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh b/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh index 41cc68e..24cf3c4 100755 --- a/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh +++ b/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh @@ -956,13 +956,27 @@ while [ $# -gt 0 ] ; do done #### 3) Checking ClickThrough present -if [ ! -f ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip ]; then + +COUNTFILE=$(ls ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip 2>/dev/null| wc --lines) +if [ ${COUNTFILE} -eq 0 ]; then echo "R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip not found!" usage exit 1 fi -if [ ! -f ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip ]; then +if [ ${COUNTFILE} -gt 1 ]; then + echo "More than one (${COUNTFILE}) R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip file found!" + echo "Clean your directory \"${_src_full}\"" + exit 1 +fi + +COUNTFILE=$(ls ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip 2>/dev/null| wc --lines) +if [ ${COUNTFILE} -eq 0 ]; then echo "R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip not found!" + exit 1 +fi +if [ ${COUNTFILE} -gt 1 ]; then + echo "More than one (${COUNTFILE}) R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip file found!" + echo "Clean your directory \"${_src_full}\"" usage exit 1 fi -- cgit 1.2.3-korg