Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

compilation logging wrapper proposal

Featured Replies

Hello,

 

When patching or generally compiling, "dialog" is not my friend for reading & testing

 

I would propose adding a wrapper in common.sh (as in branch "second")

dialog_wrapper () {

        ARGS=$(getopt -o b:p: -l "backtitle:,progressbox:" -n "$0" -- "$@");
        if [ $? -ne 0 ]; then exit 1; fi
        eval set -- "$ARGS";
        unset cmdl

        while true; do
                case "$1" in
                        -b|--backtitle)
                                shift; if [ -n "$1" ]; then cmdl="$cmdl --backtitle '$1'"; shift; fi
                        ;;
                        -p|--progressbox)
                                shift; if [ -n "$1" ]; then cmdl="$cmdl --progressbox '$1'"; shift; fi
                        ;;
                        --)
                                shift;
                        break;
                        ;;
                esac
        done

        for args in "$@"
        do
                cmdl="$cmdl $args"
        done

        LOGFILE=/dev/null

         if [[ $DIALOG_LOGFILE != "" ]] ; then
                LOGFILE=$DIALOG_LOGFILE
                [ ! -f $DIALOG_LOGFILE  ] && touch $LOGFILE
                lines=$(wc -l <$DIALOG_LOGFILE)
                if [[ $lines -ge 2000 ]]; then
                        rm -f $DIALOG_LOGFILE.log
                        mv $DIALOG_LOGFILE $DIALOG_LOGFILE.log
                        touch $DIALOG_LOGFILE
                fi
        fi

        if [[ $DIALOG_WRAPPER == "" ]] ; then
                tee -a $LOGFILE | eval "dialog $cmdl"
        else
                tee -a $LOGFILE
        fi
}

and replacing the "dialog" with "dialog_wrapper" for compilation

 

in "compile.sh", 2 options:

#DIALOG_WRAPPER # use dialog as usual

DIALOG_WRAPPER=1 # dialog is not active

#DIALOG_LOGFILE # logfile is /dev/null

DIALOG_LOGFILE=compile.log


Implemented something similar: https://github.com/zador-blood-stained/lib/commit/8e1551e9faef962d4abca603fe6d8f88d377075b, Igor can merge this if he likes it.

Options are not documented in compile.sh for now and are not dependent on each other. Affect only kernel & u-boot compilation for now.

USE_DIALOG is enabled by default,

USE_DIALOG_LOGGING is disabled by default; writes to output/debug/compilation.log if enabled (also deletes this file before new compilation).

  • Author

Zador,blood.stained,

 

Yes great!

 

it is far far simpler and far much better.

 

I wanted a wrapper to avoid Igor changes including "\" as well as to keep learning bash/scripting.

 

dealing with "dialog" non-standard parameters is pretty hard.

 

Thanks!

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.