Changeset 369 in flair-src


Ignore:
Timestamp:
Nov 17, 2020, 5:46:08 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

add status notifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/flair_compile_all.sh

    r302 r369  
    44IDE_SCRIPT=cmake_codelite_outofsource.sh
    55toolchains=($OECORE_CMAKE_TOOLCHAINS)
     6
     7
     8function notify () {
     9        notify=$(which notify-send)
     10    if [ "$notify" != "" ]; then
     11            notify-send Flair "$1" $2 $3
     12    fi
     13}
     14
     15function notify_ok () {
     16        notify "$1" -i emblem-default
     17}
     18
     19function notify_ko () {
     20        notify "$1" -i error
     21}
     22
    623
    724function green_echo () {
     
    1633        if [ "$?" != "0" ]; then
    1734                red_echo "Error, exiting"
     35        notify_ko "error while compiling"
    1836                exit 1
    1937        fi
     
    3250}
    3351
    34 
    3552sanity_check
    3653
     
    3956
    4057if [ "$answer" = "" ] || [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
    41         rm -rf $FLAIR_ROOT/flair-build/*
     58    notify "started configuration"     
     59    rm -rf $FLAIR_ROOT/flair-build/*
    4260    cd $FLAIR_ROOT/flair-build
    4361    $FLAIR_ROOT/flair-src/scripts/$IDE_SCRIPT $FLAIR_ROOT/flair-src/
     
    4765for arch in ${toolchains[@]}; do
    4866    green_echo "Compiling and installing for $arch"
     67    notify "compiling and installing for $arch"
    4968    cd $FLAIR_ROOT/flair-build/build_$arch
    5069    make -j$NB_THREADS
     
    6180fi
    6281
     82notify_ok "finished compilation"
    6383
    6484exit 0
Note: See TracChangeset for help on using the changeset viewer.