diff options
| -rwxr-xr-x | apkg | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 |