summaryrefslogtreecommitdiffstats
path: root/patches/01_use-tail-n.patch
blob: db153b8b3952a9352e5ba75546da12cfd2508425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Author: Patrick McDermott <patrick.mcdermott@libiquity.com>
Subject: Use `tail -n`

`tail -[number]` is no longer specified by POSIX and may be disabled in
ProteanOS.

diff -Naur src.orig/src/Makefile src/src/Makefile
--- src.orig/src/Makefile	2015-11-21 18:50:25.000000000 -0500
+++ src/src/Makefile	2020-12-13 10:42:04.445635494 -0500
@@ -161,7 +161,7 @@
 
 flags.i:	../test.img Makefile version $(CFILES) $(HFILES)
 	echo "#define CFLAGS \"" $(CFLAGS) "\"" >flags.i
-	tail -$$((`wc -l <Makefile`-`sed /\#\#\#/q <Makefile | wc -l`)) \
+	tail -n $$((`wc -l <Makefile`-`sed /\#\#\#/q <Makefile | wc -l`)) \
 	  <Makefile | grep -v "0x" >$(TMP)
 	for i in $(CFILES) $(HFILES) ; do cat $$i >>$(TMP) ; done
 	echo "#define CSOURCE " `./version $(TMP)` >>flags.i