diff --git a/src/usr/doc/THANKS b/src/usr/doc/THANKS index 92cb517..34b9625 100644 --- a/src/usr/doc/THANKS +++ b/src/usr/doc/THANKS @@ -96,3 +96,4 @@ We moved to github, so revision number no longer used orbea GregT Yaroslav Shmelev + smallid diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 886baf4..f323ed6 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -175,7 +175,7 @@ EOF load_repositories || exit 1 # Check for ncurses - [[ -x /usr/bin/tput ]] && HAS_NCURSES=1 + [[ -n $interactive ]] && [[ -x /usr/bin/tput ]] && HAS_NCURSES=1 } yesno_to_setunset() { @@ -771,7 +771,7 @@ check_for_updates() { for CURPKG in $PKGS; do # Bail out if the user pressed ESC - progressbar_interrupted && touch $PROGRESSBAR_INTERRUPTED && break + [[ -n $interactive ]] && progressbar_interrupted && touch $PROGRESSBAR_INTERRUPTED && break # split CURPKG into its components split_pkg_name $CURPKG @@ -4613,6 +4613,13 @@ if [[ $(id -u) != 0 ]]; then exit 1 fi +# Check if we are interactive. +if [ -t 0 ]; then + interactive=1 +else + non_interactive=1 +fi + # Set up ARCH - borrowed from SBo SlackBuild template # Automatically determine the architecture we're building on: if [[ -z "$ARCH" ]]; then diff --git a/tools/ChangeLog-latest.txt b/tools/ChangeLog-latest.txt index 65f27b5..53834d6 100644 --- a/tools/ChangeLog-latest.txt +++ b/tools/ChangeLog-latest.txt @@ -1,6 +1,6 @@ SBOPKG NEWS -sbopkg-dev (2018-09-01 23:00:08 UTC) +sbopkg-dev (2019-03-15 14:24:30 UTC) FEATURES * sqg: Parallelize building of single and all packages by option -j. Patch by Marcel Saegebarth. @@ -26,6 +26,8 @@ sbopkg-dev (2018-09-01 23:00:08 UTC) Initial patch by Orbea (#49). * sbopkg: Add logrotate support. Feature Request by wronguser (#50). + * sbokg: Add better non-interactive/cron run support + Initial patch by smallid (#56). MODIFICATIONS * bash-completion: Complete -i and -b when git repo is used