From 05416a7dec36c55dfb13ecde63dedfbccd05905c Mon Sep 17 00:00:00 2001 From: xplshn Date: Thu, 10 Apr 2025 03:38:01 +0000 Subject: Update apkg Signed-off-by: xplshn --- apkg | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apkg b/apkg index f8ffa36..3debe15 100755 --- a/apkg +++ b/apkg @@ -216,8 +216,11 @@ apply_patch() { } msg() { - ttysize=$(stty size | awk '{print $2}') - printf "%s\n" "[${name:-...}] $@" | fold -sw $ttysize + # Don't bother if we're not in a terminal + if [ -t 1 ]; then + ttysize=$(stty size 2>/dev/null | awk '{print $2}' || echo "80") + fi + printf "%s\n" "[${name:-...}] $@" | fold -sw ${ttysize:-80} } buildstatus() { @@ -248,8 +251,8 @@ build_src() { apply_patch - export CARGO_HOME=$SRC/.cargo - export GOCACHE=$SRC/.go + export CARGO_HOME=${CARGO_HOME:-$SRC/.cargo} + export GOCACHE=${GOCACHE:-$SRC/.go} export DESTDIR=$PKG export DEST_DIR=$PKG # p7zip export INSTALLROOT=$PKG # syslinux -- cgit v1.2.3