3 ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston8-20200923.zip"
4 ZIP_1_tmp="REN_R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston8-20200923__20200930.zip"
5 ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston8-20200923.zip"
6 ZIP_2_tmp="REN_R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston8-20200923__20200930.zip"
8 if [ -f "${XDG_DOWNLOAD_DIR}/${ZIP_1_tmp}" ]; then mv "${XDG_DOWNLOAD_DIR}/${ZIP_1_tmp}" "${XDG_DOWNLOAD_DIR}/${ZIP_1}"; fi
9 if [ -f "${XDG_DOWNLOAD_DIR}/${ZIP_2_tmp}" ]; then mv "${XDG_DOWNLOAD_DIR}/${ZIP_2_tmp}" "${XDG_DOWNLOAD_DIR}/${ZIP_2}"; fi
11 COPY_SCRIPT="$METADIR/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh"
13 test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
14 DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
15 EXTRACT_DIR=$METADIR/binary-tmp
18 [[ -t 1 ]] && stdout_in_terminal=1
20 [[ $stdout_in_terminal == 0 ]] && return
27 if [[ $? != 0 ]]; then
28 echo "tput: terminal doesn't support color settings, continuing" >&2
33 color_green=$(color bold 2)
34 color_yellow=$(color bold 3)
35 color_red=$(color bold 1)
36 color_none=$(color none)
39 echo "${color_red}$@${color_none}" >&2
46 function copy_mm_packages() {
47 # first clean up workdir on need
48 if [ -d $EXTRACT_DIR ]; then
49 if [ -f $EXTRACT_DIR/$ZIP_1 -a -f $EXTRACT_DIR/$ZIP_2 ]; then
50 log "The graphics and multimedia acceleration packages for R-Car Gen3 look already installed."
51 log "To force their reinstallation, please, remove manually the directory:"
58 if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
60 cp --update $DOWNLOAD_DIR/$ZIP_1 $EXTRACT_DIR
61 cp --update $DOWNLOAD_DIR/$ZIP_2 $EXTRACT_DIR
67 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_1+"\" NOT EXTRACTING CORRECTLY"
68 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_2+"\" NOT EXTRACTING CORRECTLY"
69 log "The graphics and multimedia acceleration packages for "
70 log "the R-Car Gen3 board BSP can be downloaded from:"
71 log "<https://www.renesas.com/us/en/application/automotive/r-car-h3-m3-documents-software>"
73 error "These 2 files from there should be stored in your"
74 error "'$DOWNLOAD_DIR' directory."
80 if [ -f $COPY_SCRIPT ]; then
81 cd $METADIR/bsp/meta-renesas/
82 $COPY_SCRIPT -d -f $EXTRACT_DIR
85 log "scripts to copy drivers for Gen3 not found."