toybox: 0.8.5

This commit is contained in:
Ella-0 2021-05-19 12:32:51 +01:00
parent 958e3f04ec
commit a248d8321a
2 changed files with 17 additions and 1 deletions

View file

@ -1,4 +1,4 @@
pkgver=0.8.4
pkgver=0.8.5
pkgname=toybox
pkgrel=1
deps="musl:pci-ids"
@ -7,6 +7,7 @@ fetch() {
curl "http://www.landley.net/toybox/downloads/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz
tar -xf $pkgname-$pkgver.tar.gz
cd $pkgname-$pkgver
patch -p1 < ../../ls-colour.patch
patch -p1 < ../../mksh-make.patch
}

View file

@ -0,0 +1,15 @@
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -513,9 +513,11 @@
if (!FLAG(show_control_chars)) toys.optflags |= FLAG_b;
if (FLAG(l)||FLAG(o)||FLAG(n)||FLAG(g)) toys.optflags |= FLAG_1;
else if (!(FLAG(1)||FLAG(x)||FLAG(m))) toys.optflags |= FLAG_C;
+ if (TT.color && !strcmp(TT.color, "never")) toys.optflags ^= FLAG_color;
+ else toys.optflags |= FLAG_color;
} else {
if (!FLAG(m)) toys.optflags |= FLAG_1;
- if (TT.color) toys.optflags ^= FLAG_color;
+ if (TT.color && strcmp(TT.color, "always")) toys.optflags ^= FLAG_color;
}
TT.screen_width = 80;