]> git.pld-linux.org Git - packages/fenris.git/blame - fenris-build_with_sh.patch
47201eb0fb4f047835fc4ce38117df5d fenris-ncurses.patch
[packages/fenris.git] / fenris-build_with_sh.patch
CommitLineData
81bba7fc 1diff -urN fenris.orig/build fenris/build
2--- fenris.orig/build Wed May 29 02:42:32 2002
3+++ fenris/build Thu May 30 10:23:18 2002
4@@ -1,4 +1,4 @@
5-#!/bin/bash
6+#!/bin/sh
7
8 #
9 # fenris - program execution path analysis tool
10@@ -24,10 +24,6 @@
11 #
12 # 05/16/2002: Modified by Marcin Gozdalik to use libfnprints and such.
13
14-
15-test "$BASH" = "" && echo "Bash shell is required to execute this script."
16-test "$BASH" = "" && exit 1
17-
18 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH
19
20 PROGNAME=fenris
21@@ -40,7 +36,7 @@
22 VERSION=0.06b
23
24 rm -f $PROGNAME6 $PROGNAME5 $PROGNAME3 $PROGNAME4 $PROGNAME $PROGNAME2 scnames.h core core.* *~ .testme.c .testme .testerr .gtmp CTORS.txt *.o a.out test/a.out doc/frep.txt aegir-decl.h fenris-decl.h gprof.out bb.out libdisasm/core test/core libdisasm/*.o libdisasm/a.out tools/fprints NEW-fnprints.dat .tmp NEW-fp.dat test/core.*
25-rm -f beta/*.o beta/nc-aegir &>/dev/null
26+rm -f beta/*.o beta/nc-aegir >/dev/null 2>&1
27
28 test "$1" = "clean" && echo "[+] Cleanup complete."
29 test "$1" = "clean" && exit 0
30@@ -105,18 +101,18 @@
31 echo " 'fenris-bug' reporting application. Thanks!"
32 echo
33
34-test "$1" = "" && sleep 2
35+[ -z "$1" ] && sleep 2
36
37
38 BUILD=`cat doc/.build 2>/dev/null`
39-test "$BUILD" = "" && BUILD=0
40+[ -z "$BUILD" ] && BUILD=0
41
42 if [ "$HOSTNAME" = "nimue.bos.bindview.com" ]; then
43- BUILD=$[BUILD+1]
44+ BUILD=$((BUILD+1))
45 echo "$BUILD" >doc/.build 2>/dev/null
46 echo -n "[?] Changes in this build: "
47 read x
48- if [ ! "$x" = "" ]; then
49+ if [ -n "$x" ]; then
50 echo "$VERSION [$BUILD]: $x" >.tmp
51 cat doc/ChangeLog >>.tmp 2>/dev/null
52 cat .tmp >doc/ChangeLog
53@@ -144,7 +140,7 @@
54
55 SYSNAME=`uname -s 2>/dev/null`
56
57-test "$SYSNAME" = "" && SYSNAME="unknown"
58+[ -z "$SYSNAME" ] && SYSNAME="unknown"
59
60 if [ ! "$SYSNAME" = "Linux" ]; then
61 echo "$SYSNAME is not supported!"
62@@ -158,10 +154,10 @@
63 echo -n "[+] Processor check: "
64
65 PROC=`uname -m 2>/dev/null`
66-test "$PROC" = "" && PROC="unknown"
67-PROCOK=`echo $PROC|grep ^i.86\$ 2>/dev/null`
68+[ -z "$PROC" ] && PROC="unknown"
69+PROCOK=`echo $PROC | grep ^i.86\$ 2>/dev/null`
70
71-if [ "$PROCOK" = "" ]; then
72+if [ -z "$PROCOK" ]; then
73 echo "$PROC is not supported!"
74 echo "[-] I do not support your CPU yet. Please consult documentation."
75 echo
76@@ -172,9 +168,9 @@
77
78 echo -n "[+] GNU C library version: "
79
80-LIBCVER=`/lib/libc.so.6|awk -F'version ' '{print $2}'|awk -F, '{print $1}'|head -1`
81+LIBCVER=`/lib/libc.so.6 | awk -F'version ' '{print $2}' | awk -F, '{print $1}' | head -1`
82
83-if [ "$LIBCVER" = "" ]; then
84+if [ -z "$LIBCVER" ]; then
85 echo "cannot determine libc version!"
86 echo "[-] I am affraid I cannot continue. Please consult documentation."
87 echo
88@@ -186,7 +182,7 @@
89 unset VEROK
90 for i in $OKLIBC; do test "$LIBCVER" = "$i" && VEROK="1"; done
91
92-if [ "$VEROK" = "" ]; then
93+if [ -z "$VEROK" ]; then
94 echo " (untested!)"
95 echo "[!] This voids your warranty ;) Please consult documentation."
96 echo " And, if this is not a big deal, contact author :)"
97@@ -197,9 +193,9 @@
98
99 echo -n "[+] GNU C compiler version: "
100
101-GCCVER=`gcc -v 2>&1|grep 'gcc version' 2>/dev/null|awk '{print $3}' 2>/dev/null`
102+GCCVER=`gcc -v 2>&1 | grep 'gcc version' 2>/dev/null | awk '{print $3}' 2>/dev/null`
103
104-if [ "$GCCVER" = "" ]; then
105+if [ -z "$GCCVER" ]; then
106 echo "problems calling gcc!"
107 echo "[-] I cannot continue. Please consult documentation."
108 echo
109@@ -211,7 +207,7 @@
110 unset VEROK
111 for i in $OKGCC; do test "$GCCVER" = "$i" && VEROK="1"; done
112
113-if [ "$VEROK" = "" ]; then
114+if [ -z "$VEROK" ]; then
115 echo " (untested!)"
116 echo "[!] This voids your warranty ;) Please consult documentation."
117 echo " And, if this is not a big deal, contact author :)"
118@@ -222,10 +218,10 @@
119
120 echo -n "[+] GNU libc binary test: "
121
122-STRILI=`file -L /lib/libc.so.6 2>/dev/null|grep 'not strip'`
123-GENLI=`file -L /lib/libc.so.6 2>/dev/null|grep 'strip'`
124+STRILI=`file -L /lib/libc.so.6 2>/dev/null | grep 'not strip'`
125+GENLI=`file -L /lib/libc.so.6 2>/dev/null | grep 'strip'`
126
127-if [ "$GENLI" = "" ]; then
128+if [ -z "$GENLI" ]; then
129 echo "failed!"
130 echo "[-] I cannot read your /lib/libc.so.6 (or your 'file' utility"
131 echo " is broken). Please fix it. Yes, you need libc6, yes, I need"
132@@ -234,9 +230,9 @@
133 exit 1
134 fi
135
136-if [ "$STRILI" = "" ]; then
137+if [ -z "$STRILI" ]; then
138 echo "stripped?"
139- if [ "$LAMESTRIP" = "" ]; then
140+ if [ -z "$LAMESTRIP" ]; then
141 echo "[-] Come on, you didn't strip your libc binary, did you?;)"
142 echo " I am sorry, but I really want to read some information"
143 echo " from there. Can you fix that? If not, please run me providing"
144@@ -256,10 +252,10 @@
145
146 echo -n "[+] GCC crt code binary test: "
147
148-STRILI=`file -L /usr/lib/crt1.o 2>/dev/null|grep 'not strip'`
149-GENLI=`file -L /usr/lib/crt1.o 2>/dev/null|grep 'strip'`
150+STRILI=`file -L /usr/lib/crt1.o 2>/dev/null | grep 'not strip'`
151+GENLI=`file -L /usr/lib/crt1.o 2>/dev/null | grep 'strip'`
152
153-if [ "$GENLI" = "" ]; then
154+if [ -z "$GENLI" ]; then
155 echo "failed!"
156 echo "[-] I cannot read your /usr/lib/crt1.o (or your 'file' utility"
157 echo " is broken). Please fix it. Thanks =)"
158@@ -267,9 +263,9 @@
159 exit 1
160 fi
161
162-if [ "$STRILI" = "" ]; then
163+if [ -z "$STRILI" ]; then
164 echo "stripped?"
165- if [ "$LAMESTRIP" = "" ]; then
166+ if [ -z "$LAMESTRIP" ]; then
167 echo "[-] Come on, you didn't strip your crt binary, did you?;)"
168 echo " I am sorry, but I really want to read some information"
169 echo " from there. Can you fix that? If not, please run me providing"
170@@ -289,10 +285,10 @@
171
172 echo -n "[+] GNU libc linker test: "
173
174-STRILI=`file -L /lib/ld-linux.so.2 2>/dev/null|grep 'not strip'`
175-GENLI=`file -L /lib/ld-linux.so.2 2>/dev/null|grep 'strip'`
176+STRILI=`file -L /lib/ld-linux.so.2 2>/dev/null | grep 'not strip'`
177+GENLI=`file -L /lib/ld-linux.so.2 2>/dev/null | grep 'strip'`
178
179-if [ "$GENLI" = "" ]; then
180+if [ -z "$GENLI" ]; then
181 echo "failed!"
182 echo "[-] I cannot read your /lib/ld-linux.so.2 (or your 'file' utility"
183 echo " is broken). Please fix it. Yes, you need libc6, yes, I need"
184@@ -301,9 +297,9 @@
185 exit 1
186 fi
187
188-if [ "$STRILI" = "" ]; then
189+if [ -z "$STRILI" ]; then
190 echo "stripped?"
191- if [ "$LAMESTRIP" = "" ]; then
192+ if [ -z "$LAMESTRIP" ]; then
193 echo "[-] Come on, you didn't strip your crt binary, did you?;)"
194 echo " I am sorry, but I really want to read some information"
195 echo " from there. Can you fix that? If not, please run me providing"
196@@ -340,9 +336,9 @@
197 }
198 _EOF_
199
200-gcc .testme.c -o .testme &>.testerr
201+gcc .testme.c -o .testme >.testerr 2>&1
202
203-if [ ! -s .testme ]; then
204+if [ `cat .testme | wc -c` -eq 0 ]; then
205 echo "gcc failed to compile test code!"
206 echo "[-] I really have to perform tests. Please consult documentation."
207 echo
208@@ -389,14 +385,14 @@
209 echo "x/2w _dl_runtime_resolve+16" >>.testerr 2>/dev/null
210
211 gdb -batch -x .testerr ./.testme >.gtmp 2>/dev/null
212-ADDR=`grep open .gtmp 2>/dev/null|grep ^0x 2>/dev/null | awk '{print $1}' 2>/dev/null`
213+ADDR=`grep open .gtmp 2>/dev/null | grep ^0x 2>/dev/null | awk '{print $1}' 2>/dev/null`
214
215 RES=`grep -F resolve .gtmp 2>/dev/null`
216 JMP=`grep -F getuid .gtmp 2>/dev/null`
217
218 rm -f .testerr .testme
219
220-if [ "$ADDR" = "" ]; then
221+if [ -z "$ADDR" ]; then
222 rm -f .gtmp
223 echo "problems executing gdb!"
224 echo "[-] I need gdb to determine your defaults. Please consult documentation."
225@@ -404,9 +400,9 @@
226 exit 1
227 fi
228
229-MAPSEG=`printf "%x" $[ADDR/(256*256*256)] 2>/dev/null`
230+MAPSEG=`printf "%x" $((16#${ADDR#0x}/256/256/256)) 2>/dev/null`
231
232-if [ "$MAPSEG" = "" ]; then
233+if [ -z "$MAPSEG" ]; then
234 rm -f .gtmp
235 echo "cannot calculate segment address!"
236 echo "[-] That's very bad. Please consult documentation."
237@@ -424,14 +420,14 @@
238
239 echo -n "[+] C library _init code: "
240
241-for i in `grep -B 1 enter_dynamic fenris.c |grep AS_UI|awk -F== '{print $2}'|awk -F\) '{print $1}'|awk '!(NR % 2) {print DUPA ".*" $1};(NR % 2) {DUPA=$1}'`; do
242+for i in `grep -B 1 enter_dynamic fenris.c | grep AS_UI | awk -F== '{print $2}' | awk -F\) '{print $1}' | awk '!(NR % 2) {print DUPA ".*" $1};(NR % 2) {DUPA=$1}'`; do
243 FIKU=`grep "$i" .gtmp`
244- test "$FIKU" = "" || CTORSOK=`echo "$i"|sed 's/\.\*/ /g'`
245+ [ -z "$FIKU" ] || CTORSOK=`echo "$i" | sed 's/\.\*/ /g'`
246 done
247
248 rm -f .gtmp
249
250-if [ ! "$CTORSOK" = "" ]; then
251+if [ -n "$CTORSOK" ]; then
252 echo "supported ($CTORSOK)"
253 else
254 echo "no known _init pattern!"
255@@ -461,7 +457,7 @@
256 echo "disass __do_global_ctors_aux" >>.testerr 2>/dev/null
257 gdb -batch -x .testerr ./.testme >>CTORS.txt 2>&1
258 echo >>CTORS.txt
259- objdump -d ./.testme 2>&1 |grep -A 20 ctors_aux\>: >>CTORS.txt 2>&1
260+ objdump -d ./.testme 2>&1 | grep -A 20 ctors_aux\>: >>CTORS.txt 2>&1
261 rm -f .testerr .testme .testme.c
262 ls -l CTORS.txt
263 sleep 4
264@@ -472,11 +468,11 @@
265
266 R=`echo "$RES" | grep '0x0487595a.*0x0008c224'`
267
268-if [ ! "$R" = "" ]; then
269+if [ -n "$R" ]; then
270 echo "valid"
271 else
272 echo "no known pattern!"
273- if [ "$LAMESTRIP" = "" ]; then
274+ if [ -z "$LAMESTRIP" ]; then
275 echo
276 echo "[-] Your GNU C library linker does not seem to use known"
277 echo " _dl_runtime_resolve() function code. This means I would not"
278@@ -515,7 +511,7 @@
279
280 P=`echo "$JMP" | grep '25ff'`
281
282-if [ ! "$P" = "" ]; then
283+if [ -n "$P" ]; then
284 echo "valid"
285 else
286 echo "no known pattern!"
287@@ -569,7 +565,7 @@
288 unset HAVE_OSSL
289 echo -n "[+] RSA MD5 implementation: "
290 if [ ! -f /usr/include/md5.h ]; then
291- if [ ! -f /usr/include/local/md5.h ]; then
292+ if [ ! -f /usr/local/include/md5.h ]; then
293 echo "md5.h not found!"
294 echo "[-] You need to have OpenSSL MD5 or RSA MD5 libraries installed."
295 echo
296@@ -586,14 +582,18 @@
297 CFLAGS="-DUSE_OPENSSL=1"
298 CFLAGS2="-DUSE_OPENSSL=1"
299
300- if [ ! -f /usr/lib/libcrypto.so ]; then
301- if [ ! -f /usr/local/lib/libcrypto.so ]; then
302- if [ ! -f /usr/lib/libcrypto.a ]; then
303- if [ ! -f /usr/local/lib/libcrypto.a ]; then
304- echo "libcrypto.so not found!"
305- echo "[-] Please install OpenSSL or RSA MD5 implementation."
306- echo
307- exit 1
308+ if [ ! -f /lib/libcrypto.so ]; then
309+ if [ ! -f /usr/lib/libcrypto.so ]; then
310+ if [ ! -f /usr/local/lib/libcrypto.so ]; then
311+ if [ ! -f /lib/libcrypto.a ]; then
312+ if [ ! -f /usr/lib/libcrypto.a ]; then
313+ if [ ! -f /usr/local/lib/libcrypto.a ]; then
314+ echo "libcrypto.so not found!"
315+ echo "[-] Please install OpenSSL or RSA MD5 implementation."
316+ echo
317+ exit 1
318+ fi
319+ fi
320 fi
321 fi
322 fi
323@@ -603,16 +603,20 @@
324
325 LDFLAGS="$LDFLAGS -lmd5"
326
327- if [ ! -f /usr/lib/libmd5.so ]; then
328- if [ ! -f /usr/local/lib/libmd5.so ]; then
329- if [ ! -f /usr/lib/libmd5.a ]; then
330- if [ ! -f /usr/local/lib/libmd5.a ]; then
331+ if [ ! -f /lib/libmd5.so ]; then
332+ if [ ! -f /usr/lib/libmd5.so ]; then
333+ if [ ! -f /usr/local/lib/libmd5.so ]; then
334+ if [ ! -f /lib/libmd5.a ]; then
335+ if [ ! -f /usr/lib/libmd5.a ]; then
336+ if [ ! -f /usr/local/lib/libmd5.a ]; then
337 echo "libcrypto.so not found!"
338 echo "[-] Please install OpenSSL or RSA MD5 implementation."
339 echo
340 exit 1
341+ fi
342 fi
343 fi
344+ fi
345 fi
346 fi
347
348@@ -633,14 +637,18 @@
349 fi
350 fi
351
352-if [ ! -f /usr/lib/libbfd.so ]; then
353- if [ ! -f /usr/local/lib/libbfd.so ]; then
354- if [ ! -f /usr/lib/libbfd.a ]; then
355- if [ ! -f /usr/local/lib/libbfd.a ]; then
356- echo "libbfd not found!"
357- echo "[-] Please install binutils libraries."
358- echo
359- exit 1
360+if [ ! -f /lib/libbfd.so ]; then
361+ if [ ! -f /usr/lib/libbfd.so ]; then
362+ if [ ! -f /usr/local/lib/libbfd.so ]; then
363+ if [ ! -f /lib/libbfd.a ]; then
364+ if [ ! -f /usr/lib/libbfd.a ]; then
365+ if [ ! -f /usr/local/lib/libbfd.a ]; then
366+ echo "libbfd not found!"
367+ echo "[-] Please install binutils libraries."
368+ echo
369+ exit 1
370+ fi
371+ fi
372 fi
373 fi
374 fi
375@@ -648,14 +656,18 @@
376
377 echo -n "(libbfd) "
378
379-if [ ! -f /usr/lib/libiberty.a ]; then
380- if [ ! -f /usr/local/lib/libiberty.a ]; then
381- if [ ! -f /usr/lib/libiberty.so ]; then
382- if [ ! -f /usr/local/lib/libiberty.so ]; then
383- echo "libiberty not found!"
384- echo "[-] Please install binutils libraries."
385- echo
386- exit 1
387+if [ ! -f /lib/libiberty.a ]; then
388+ if [ ! -f /usr/lib/libiberty.a ]; then
389+ if [ ! -f /usr/local/lib/libiberty.a ]; then
390+ if [ ! -f /lib/libiberty.so ]; then
391+ if [ ! -f /usr/lib/libiberty.so ]; then
392+ if [ ! -f /usr/local/lib/libiberty.so ]; then
393+ echo "libiberty not found!"
394+ echo "[-] Please install binutils libraries."
395+ echo
396+ exit 1
397+ fi
398+ fi
399 fi
400 fi
401 fi
402@@ -667,14 +679,14 @@
403
404 if [ -f /usr/include/readline/readline.h -o -f /usr/local/include/readline/readline.h ]; then
405
406- if [ -f /usr/lib/libreadline.so -o -f /usr/local/lib/libreadline.so -o -f /usr/lib/libreadline.a -o -f /usr/local/lib/libreadline.a ]; then
407+ if [ -f /lib/libreadline.so -o -f /usr/lib/libreadline.so -o -f /usr/local/lib/libreadline.so -o -f /lib/libreadline.a -o -f /usr/lib/libreadline.a -o -f /usr/local/lib/libreadline.a ]; then
408
409- if [ -f /usr/lib/libtinfo.so -o -f /usr/local/lib/libtinfo.so -o -f /usr/lib/libtinfo.a -o -f /usr/local/lib/libtinfo.a ]; then
410+ if [ -f /lib/libtinfo.so -o -f /usr/lib/libtinfo.so -o -f /usr/local/lib/libtinfo.so -o -f /lib/libtinfo.a -o -f /usr/lib/libtinfo.a -o -f /usr/local/lib/libtinfo.a ]; then
411 CFLAGS="-DHAVE_READLINE -D__USE_TERMCAP $CFLAGS"
412 LDFLAGS="-lreadline $LDFLAGS"
413 LDGLAGS="$LDFLAGS -ltinfo"
414 echo "yes, with libtinfo"
415- elif [ -f /usr/lib/libtermcap.so -o -f /usr/local/lib/libtermcap.so -o -f /usr/lib/libtermcap.a -o -f /usr/local/lib/libtermcap.a ]; then
416+ elif [ -f /lib/libtermcap.so -o -f /usr/lib/libtermcap.so -o -f /usr/local/lib/libtermcap.so -o -f /lib/libtermcap.a -o -f /usr/lib/libtermcap.a -o -f /usr/local/lib/libtermcap.a ]; then
417 CFLAGS="-DHAVE_READLINE -D__USE_TERMCAP $CFLAGS"
418 LDFLAGS="-lreadline $LDFLAGS"
419 LDFLAGS="$LDFLAGS -ltermcap"
420@@ -716,7 +728,7 @@
421 echo -n "[+] libncurses installed: "
422
423 if [ -f /usr/include/curses.h -o -f /usr/local/include/curses.h ]; then
424- if [ -f /usr/lib/libncurses.so -o -f /usr/local/lib/libncurses.so -o -f /usr/lib/libncurses.a -o -f /usr/local/lib/libncurses.a ]; then
425+ if [ -f /lib/libncurses.so -o -f /usr/lib/libncurses.so -o -f /usr/local/lib/libncurses.so -o -f /lib/libncurses.a -o -f /usr/lib/libncurses.a -o -f /usr/local/lib/libncurses.a ]; then
426 echo "yes, nc-aegir will be built."
427 NCAEGIR=yes
428 else
429@@ -726,7 +738,7 @@
430 echo "no, nc-aegir will not be built."
431 fi
432
433-if [ ! "$NCAEGIR" = "" ]; then
434+if [ -n "$NCAEGIR" ]; then
435 echo -n "[+] 'screen' installed: "
436 if [ -x /usr/bin/screen -o -x /usr/local/bin/screen ]; then
437 echo "yes"
438@@ -752,7 +764,7 @@
439 exit 1
440 fi
441
442-echo "$[LIN-1] entries"
443+echo "$((LIN-1)) entries"
444
445 echo -n "[*] Generating decl list for fenris.c: "
446
447@@ -768,7 +780,7 @@
448 exit 1
449 fi
450
451-echo "$[LIN-1] entries"
452+echo "$((LIN-1)) entries"
453
454 echo -n "[*] Generating decl list for aegir.c: "
455
456@@ -784,7 +796,7 @@
457 exit 1
458 fi
459
460-echo "$[LIN-1] entries"
461+echo "$((LIN-1)) entries"
462
463
464 echo -n "[*] Compiling libi386: "
465@@ -921,7 +933,7 @@
466 rm -f .testerr
467
468
469-if [ ! "$NCAEGIR" = "" ]; then
470+if [ -n "$NCAEGIR" ]; then
471 echo -n "[*] Compiling nc-opdis: "
472 gcc -c $CFLAGS2 libdisasm/opcodes2/nc-opdis.c 2>.testerr
473
474@@ -1026,7 +1038,7 @@
475 fi
476
477 rm -f .testerr
478-test "$NOSTRIP" = "" && strip $PROGNAME 2>/dev/null
479+[ -z "$NOSTRIP" ] && strip $PROGNAME 2>/dev/null
480
481 echo -n "[*] Compiling $PROGNAME2: "
482
483@@ -1125,7 +1137,7 @@
484 rm -f .testerr
485
486
487-if [ ! "$NCAEGIR" = "" ]; then
488+if [ -n "$NCAEGIR" ]; then
489 echo -n "[*] Compiling $PROGNAME6: "
490 gcc -lncurses $LDFLAGS $CFLAGS $PROGNAME6.c libfnprints.o i386-dis.o nc-opdis.o -o $PROGNAME6 -DVERSION=\"$VERSION\" -DBUILD=\"$BUILD\" -DLIBCSEG=$MAPSEG 2>.testerr
491 if [ ! -s $PROGNAME6 ]; then
492@@ -1156,12 +1168,12 @@
493
494
495
496-test "$NOSTRIP" = "" && strip $PROGNAME 2>/dev/null
497-test "$NOSTRIP" = "" && strip $PROGNAME4 2>/dev/null
498-test "$NOSTRIP" = "" && strip $PROGNAME2 2>/dev/null
499-test "$NOSTRIP" = "" && strip $PROGNAME3 2>/dev/null
500-test "$NOSTRIP" = "" && strip $PROGNAME5 2>/dev/null
501-test "$NOSTRIP" = "" && strip $PROGNAME6 2>/dev/null
502+[ -z "$NOSTRIP" ] && strip $PROGNAME 2>/dev/null
503+[ -z "$NOSTRIP" ] && strip $PROGNAME4 2>/dev/null
504+[ -z "$NOSTRIP" ] && strip $PROGNAME2 2>/dev/null
505+[ -z "$NOSTRIP" ] && strip $PROGNAME3 2>/dev/null
506+[ -z "$NOSTRIP" ] && strip $PROGNAME5 2>/dev/null
507+[ -z "$NOSTRIP" ] && strip $PROGNAME6 2>/dev/null
508
509 HUH=""
510 test "$1" = "" && HUH=1
511@@ -1175,7 +1187,7 @@
512 cat .tmp >fnprints.dat
513 rm -f .tmp
514 CNT=`grep -c . fnprints.dat`
515- test "$CNT" = "" && CNT=0
516+ [ -z "$CNT" ] && CNT=0
517 echo "[*] Updating libc fingerprints database (this will take a while)..."
518 NOBANNER=1 ./getfprints
519 echo "[*] Sorting your fingerprints..."
520@@ -1190,7 +1202,7 @@
521 exit 1
522 fi
523
524- diff -d 'fnprints.dat' 'NEW-fnprints.dat' | grep '^> ' |awk -F'> ' '{print $2}' >.news
525+ diff -d 'fnprints.dat' 'NEW-fnprints.dat' | grep '^> ' | awk -F'> ' '{print $2}' >.news
526
527 rm -f NEW-fnprints.dat fnprints.dat
528 mv -f .tmp fnprints.dat
529@@ -1203,7 +1215,7 @@
530 cat .news >>NEW-fp.dat
531
532 echo
533- echo "[+] Congratulations, your system has $[CNT2-CNT] new fingerprints."
534+ echo "[+] Congratulations, your system has $((CNT2-CNT)) new fingerprints."
535 echo " I created a file called NEW-fp.dat for you. It woule be very nice"
536 echo " if you can send it to the author, lcamtuf@coredump.cx. Thanks!"
537 echo
538@@ -1215,14 +1227,14 @@
539
540 rm -f .news .tmp
541
542- echo "[+] You have $[`grep -c . fnprints.dat`] fingerprints."
543+ echo "[+] You have $((`grep -c . fnprints.dat`)) fingerprints."
544
545
546 fi
547
548 if [ -f test.c ]; then
549 echo "[+] Ah, I see you have test.c here... Lemme compile it for you!"
550- gcc test.c &>/dev/null
551+ gcc test.c >/dev/null 2>&1
552 fi
553
554 echo "[+] All set. Please read the documentation."
This page took 2.323867 seconds and 4 git commands to generate.