aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/docs/sample/copyscript
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2018-04-10 19:06:30 +0200
committerKhang Nguyen <khang.nguyen.xv@rvc.renesas.com>2018-06-18 17:55:58 +0700
commit917ffec2abdeb8c5c2eda7693ec8541433aa57bf (patch)
treebe299bde3a192bef1da513382c866b0c8908c5cb /meta-rcar-gen3/docs/sample/copyscript
parent5e48988a982385928db18d0ec8eb8b8e4d67ac34 (diff)
rcar-gen3: copyscript: Improve install driver script
This commit backports patch from community to improve install driver script: * if the driver source directory (${_src_full}) have more than 1 driver file, the script will be failed. ([ ! -f file*.zip ] can match only one file). Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> Signed-off-by: Khang Nguyen <khang.nguyen.xv@rvc.renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
Diffstat (limited to 'meta-rcar-gen3/docs/sample/copyscript')
-rwxr-xr-xmeta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh18
1 files 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..fd867b3 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