aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapkg11
1 files 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