]> git.pld-linux.org Git - packages/translate-toolkit.git/blob - unbash.patch
cd92050242df40abafc8e37b332adee82b3b1fa5
[packages/translate-toolkit.git] / unbash.patch
1 --- translate-toolkit-1.7.0/tools.orig/junitmsgfmt      2010-05-12 16:41:15.000000000 +0200
2 +++ translate-toolkit-1.7.0/tools/junitmsgfmt   2010-05-13 19:21:20.617544285 +0200
3 @@ -1,4 +1,4 @@
4 -#!/bin/bash
5 +#!/bin/sh
6  #
7  # Copyright 2010 Zuza Software Foundation
8  #
9 @@ -25,38 +25,38 @@
10  failures=0
11  successes=0
12  
13 -function failure {
14 +failure() {
15         pofile=$1
16         body=$(echo $body; echo "<testcase classname=\"$pofile\" name=\"msgfmt\" time=\"\">\n"; echo "<failure message=\"msgfmt failure\">$message</failure>\n</testcase>\n")
17         message=""
18         failures=$(($failures + 1))
19  }
20  
21 -function success {
22 +success() {
23         pofile=$1
24         body=$(echo $body; echo "<testcase classname=\"$pofile\" name=\"msgfmt\" time=\"\"></testcase>\n")
25         message=""
26         successes=$(($successes + 1))
27  }
28  
29 -function run_msgfmt {
30 +run_msgfmt() {
31         pofile=$1
32         exit_status=$(msgfmt -cv -o /dev/null $pofile 2>/dev/null > /dev/null; echo $?)
33 -       message=$(msgfmt -cv -o /dev/null $pofile 2>/dev/stdout | while read i; do echo "$i\n" ; done)
34 +       message=$(msgfmt -cv -o /dev/null $pofile 2>/dev/stdout | while read i; do echo "$i"; echo "" ; done)
35         return $exit_status
36  }
37  
38 -function print_header {
39 +print_header() {
40          echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
41         echo "<testsuite name=\"\" errors=\"0\" failures=\"$failures\" skips=\"0\" tests=\"$((failures + successes))\" time=\"\" >"
42  }
43  
44 -function print_body {
45 +print_body() {
46         cat -
47 -       echo -e $body
48 +       echo $body
49  }
50  
51 -function print_footer {
52 +print_footer() {
53         cat -
54         echo "</testsuite>"
55  }
56 --- translate-toolkit-1.7.0/tools.orig/pocommentclean   2008-10-31 16:58:36.000000000 +0100
57 +++ translate-toolkit-1.7.0/tools/pocommentclean        2010-05-13 19:21:20.617544285 +0200
58 @@ -1,4 +1,4 @@
59 -#!/bin/bash
60 +#!/bin/sh
61  #
62  # Copyright 2005 Zuza Software Foundation
63  #
64 --- translate-toolkit-1.7.0/tools.orig/pocompendium     2008-01-24 12:54:56.000000000 +0100
65 +++ translate-toolkit-1.7.0/tools/pocompendium  2010-05-13 19:21:20.621015064 +0200
66 @@ -1,4 +1,4 @@
67 -#!/bin/bash
68 +#!/bin/bash
69  #
70  # Copyright 2004, 2005 Zuza Software Foundation
71  #
72 @@ -24,7 +24,7 @@
73  # combined and marked fuzzy.
74  
75  
76 -function print_usage() {
77 +print_usage() {
78         echo "Usage: `basename $0` [options] output.po <-d directory(s)|file(s)>"
79         echo "       The first parameter is the output file, standard output if the output file is '-'."
80         echo "       Any number of directories may be specified for input files."
81 @@ -97,7 +97,7 @@
82  
83  tmp_dir=`mktemp -d tmp.XXXXXXXXXX`
84  
85 -if [ $1 == "-d" ]; then
86 +if [ $1 = "-d" ]; then
87         shift
88         directories=$*
89         if [ $# -eq 0 ]; then
90 --- translate-toolkit-1.7.0/tools.orig/pomigrate2       2009-07-21 21:40:54.000000000 +0200
91 +++ translate-toolkit-1.7.0/tools/pomigrate2    2010-05-13 19:21:20.621015064 +0200
92 @@ -1,4 +1,4 @@
93 -#!/bin/bash
94 +#!/bin/bash
95  #
96  # Copyright 2004, 2005 Zuza Software Foundation
97  #
98 @@ -22,7 +22,7 @@
99  # pomigrate2 - migrates PO files from an old version using new POT files.
100  
101  
102 -function usage() {
103 +usage() {
104         echo "Usage `basename $0` [options] <product-old> <product-new> <product-templates>"
105          echo
106          echo "Options:"
107 @@ -100,7 +100,7 @@
108  
109  echo "** Migrating files... **"
110  pots=`cd $templates; find . -name "*.pot"`
111 -if [ "$pots" == "" ]; then
112 +if [ "$pots" = "" ]; then
113         echo "No POT templates found in: $templates"
114         exit 1
115  fi
116 --- translate-toolkit-1.7.0/tools.orig/popuretext       2010-01-12 14:02:34.000000000 +0100
117 +++ translate-toolkit-1.7.0/tools/popuretext    2010-05-13 19:21:20.621015064 +0200
118 @@ -1,4 +1,4 @@
119 -#!/bin/bash
120 +#!/bin/sh
121  #
122  # Copyright 2005 Zuza Software Foundation
123  #
124 @@ -28,7 +28,7 @@
125  fi
126  
127  do_pot=0
128 -if [ "$1" == "-P" ]; then
129 +if [ "$1" = "-P" ]; then
130         do_pot=1
131         shift
132         potdir=$1
133 --- translate-toolkit-1.7.0/tools.orig/poreencode       2008-01-24 12:54:56.000000000 +0100
134 +++ translate-toolkit-1.7.0/tools/poreencode    2010-05-13 19:21:20.621015064 +0200
135 @@ -1,4 +1,4 @@
136 -#!/bin/bash
137 +#!/bin/sh
138  #
139  # Copyright 2004 Zuza Software Foundation
140  #
141 --- translate-toolkit-1.7.0/tools.orig/posplit  2007-02-01 11:40:17.000000000 +0100
142 +++ translate-toolkit-1.7.0/tools/posplit       2010-05-13 19:21:20.621015064 +0200
143 @@ -1,4 +1,4 @@
144 -#!/bin/bash
145 +#!/bin/sh
146  #
147  # Copyright 2004, 2007 Zuza Software Foundation
148  #
This page took 0.108523 seconds and 2 git commands to generate.