- if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
- mkdir -p $EXTRACT_DIR
- unzip -n $DOWNLOAD_DIR/$ZIP_1 -d $EXTRACT_DIR
- if [ $? -ne 0 ]; then
- echo -e "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_1+"\" NOT EXTRACTING CORRECTLY"
- return 1
- fi
- unzip -n $DOWNLOAD_DIR/$ZIP_2 -d $EXTRACT_DIR
- if [ $? -ne 0 ]; then
- echo -e "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_2+"\" NOT EXTRACTING CORRECTLY"
- return 1
- fi
- else
- echo -n "The graphics and multimedia acceleration packages for "
- echo -e "the R-Car Gen3 board can be downloaded from:"
- echo -e " https://www.renesas.com/en-us/software/D6000821.html"
- echo -e " https://www.renesas.com/en-us/software/D6000822.html"
- echo -e
- echo -n "These 2 files from there should be stored in your"
- echo -e "'$DOWNLOAD_DIR' directory."
- echo -e " $ZIP_1"
- echo -e " $ZIP_2"
- return 1
+ # first clean up workdir on need
+ if [ -d $EXTRACT_DIR ]; then
+ if [ -f $EXTRACT_DIR/$ZIP_1 -a -f $EXTRACT_DIR/$ZIP_2 ]; then
+ log "The graphics and multimedia acceleration packages for R-Car Gen3 look already installed."
+ log "To force their reinstallation, please, remove manually the directory:"
+ log " $EXTRACT_DIR"
+ log
+ return 0