summaryrefslogtreecommitdiff
path: root/converters/convmv/patches/patch-ab
blob: 2f99615ddf91947258e9c128c0c04dc55931a9f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$NetBSD: patch-ab,v 1.3 2007/01/14 16:25:25 wiz Exp $

--- suite/dotests.sh.orig	2006-06-25 22:01:16.000000000 +0000
+++ suite/dotests.sh
@@ -1,13 +1,21 @@
 #!/bin/sh
 # this requires GNU find to be used because of -printf feature
 # you might want to change this to GNU find's full path:
-FIND=find
+FIND=${CONVMV_FIND}
 FINDEXP="%P -- %l\n"
-for dir in `ls -d test*` ; do $FIND $dir/ -printf "$FINDEXP" > out-$dir ; done
+# make this overridable on non-GNU systems which may have those commands
+# as gls and gcp
+CONVMV_LS=${CONVMV_LS:-ls}
+CONVMV_CP=${CONVMV_CP:-cp}
+
+# to get 0777 permissions for symlinks on non-Linux systems
+umask 0
+
+for dir in `${CONVMV_LS} -d test*` ; do $FIND $dir/ -printf "$FINDEXP" > out-$dir ; done
 #
 echo smartness-test
 rm -rf test.tmp
-cp -r test test.tmp
+${CONVMV_CP} -r test test.tmp
 ../convmv -f iso8859-15 -t utf8 --notest -r test.tmp
 false
 $FIND test.tmp -printf "$FINDEXP" > out.tmp
@@ -24,21 +32,21 @@ diff out-test out.tmp > diff.tmp|| { ech
 #
 echo utf8-to-iso8859-15-test
 rm -r test.tmp
-cp -r test test.tmp
+${CONVMV_CP} -r test test.tmp
 ../convmv -f utf8 -t iso8859-15 --notest -r test.tmp
 $FIND test.tmp -printf "$FINDEXP" > out.tmp
 diff out-test-iso8859-15 out.tmp > diff.tmp|| { echo utf8-to-iso8859-15-test failed. ; exit 1; }
 #
 echo iso8859-15-to-utf8-test
 rm -r test.tmp
-cp -r test-iso8859-15 test.tmp
+${CONVMV_CP} -r test-iso8859-15 test.tmp
 ../convmv -f iso8859-15 -t utf8 --notest -r test.tmp
 $FIND test.tmp -printf "$FINDEXP" > out.tmp
 diff out-test out.tmp > diff.tmp|| { echo iso8859-15-to-utf8-test failed. ; exit 1; }
 #
 echo nfc-test
 rm -r test.tmp
-cp -r test test.tmp
+${CONVMV_CP} -r test test.tmp
 ../convmv -f utf-8 -t utf-8 --nfd --notest -r test.tmp
 $FIND test.tmp -printf "$FINDEXP" > out.tmp
 diff out-test-nfd out.tmp > diff.tmp|| { echo nfd-test failed. ; exit 1; }
@@ -49,14 +57,14 @@ diff out-test out.tmp > diff.tmp|| { ech
 #
 echo escaped-test
 rm -r test.tmp
-cp -r test-escaped test.tmp
+${CONVMV_CP} -r test-escaped test.tmp
 ../convmv --unescape --notest -r test.tmp
 $FIND test.tmp -printf "$FINDEXP" > out.tmp
 diff out-test out.tmp > diff.tmp|| { echo escaped-test failed. ; exit 1; }
 #
 echo upper-test
 rm -r test.tmp
-cp -r test test.tmp
+${CONVMV_CP} -r test test.tmp
 ../convmv --upper -f utf8 --notest -r test.tmp
 $FIND TEST.TMP -printf "$FINDEXP" > out.tmp
 diff out-test-upper out.tmp > diff.tmp|| { echo upper-test failed. ; exit 1; }