3 ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190802.zip"
4 ZIP_1_tmp="REN_R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190802__20190808.zip"
5 ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20191021.zip"
6 ZIP_2_tmp="REN_R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20191021__20191031.zip"
8 COPY_SCRIPT="$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh"
10 test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
11 DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
13 if [ -f "${DOWNLOAD_DIR}/${ZIP_1_tmp}" ]; then mv "${DOWNLOAD_DIR}/${ZIP_1_tmp}" "${DOWNLOAD_DIR}/${ZIP_1}"; fi
14 if [ -f "${DOWNLOAD_DIR}/${ZIP_2_tmp}" ]; then mv "${DOWNLOAD_DIR}/${ZIP_2_tmp}" "${DOWNLOAD_DIR}/${ZIP_2}"; fi
17 EXTRACT_DIR=$METADIR/binary-tmp
20 [[ -t 1 ]] && stdout_in_terminal=1
22 [[ $stdout_in_terminal == 0 ]] && return
29 if [[ $? != 0 ]]; then
30 echo "tput: terminal doesn't support color settings, continuing" >&2
35 color_green=$(color bold 2)
36 color_yellow=$(color bold 3)
37 color_red=$(color bold 1)
38 color_none=$(color none)
41 echo "${color_red}$@${color_none}" >&2
48 function copy_mm_packages() {
49 # first clean up workdir on need
50 if [ -d $EXTRACT_DIR ]; then
51 if [ -f $EXTRACT_DIR/$ZIP_1 -a -f $EXTRACT_DIR/$ZIP_2 ]; then
52 log "The graphics and multimedia acceleration packages for R-Car Gen3 look already installed."
53 log "To force their reinstallation, please, remove manually the directory:"
61 if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
63 cp --update $DOWNLOAD_DIR/$ZIP_1 $EXTRACT_DIR
64 cp --update $DOWNLOAD_DIR/$ZIP_2 $EXTRACT_DIR
66 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_1+"\" NOT EXTRACTING CORRECTLY"
67 error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_2+"\" NOT EXTRACTING CORRECTLY"
68 log "The graphics and multimedia acceleration packages for "
69 log "the R-Car Gen3 board BSP can be downloaded from:"
70 log "<https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html>"
72 error "These 2 files from there should be stored in your"
73 error "'$DOWNLOAD_DIR' directory."
79 if [ -f $COPY_SCRIPT ]; then
80 cd $METADIR/bsp/meta-renesas-rcar-gen3/
81 $COPY_SCRIPT -d -f $EXTRACT_DIR
84 log "scripts to copy drivers for Gen3 not found."