aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxplshn <xplshn@noreply.codeberg.org>2025-04-10 03:38:01 +0000
committerxplshn <xplshn@noreply.codeberg.org>2025-04-10 03:38:01 +0000
commit05416a7dec36c55dfb13ecde63dedfbccd05905c (patch)
tree4e87db8dc3846a86845b11433fe5680268684fbe
parentca3b8902af0723e10de4bd5f81bde0d7e4090fcc (diff)
downloadautils-05416a7dec36c55dfb13ecde63dedfbccd05905c.tar.gz
autils-05416a7dec36c55dfb13ecde63dedfbccd05905c.zip
Update apkg
Signed-off-by: xplshn <xplshn@noreply.codeberg.org>
-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