File: gvmap.sh_bashism.patch

package info (click to toggle)
graphviz 2.42.4-3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 95,884 kB
  • sloc: ansic: 1,051,566; cpp: 9,107; makefile: 5,538; tcl: 4,897; sh: 4,506; yacc: 4,190; xml: 2,970; cs: 1,921; objc: 1,157; lex: 625; java: 560; perl: 445; python: 255; awk: 241; javascript: 146; ruby: 64; php: 59; sed: 1
file content (43 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (7)
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
Description: remove bashism from gvmap.sh
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Bug-Debian: https://bugs.debian.org/772234
Last-Update: 2016-06-10

---

--- graphviz-2.38.0.orig/cmd/gvmap/gvmap.sh
+++ graphviz-2.38.0/cmd/gvmap/gvmap.sh
@@ -64,7 +64,7 @@ do
     exit 2
     ;;
   \? )
-    if [[ "$OPTARG" == '?' ]]
+    if [ "$OPTARG" = '?' ]
     then
       getopts -a gvmap "$OPTSTR" x '-?'
       exit 0
@@ -76,19 +76,19 @@ do
 done
 shift $((OPTIND-1))
 
-if [[ $# == 0 ]]
+if [ $# -eq 0 ]
 then
-  if [[ -n $VERBOSE ]]
+  if [ -n $VERBOSE ]
   then
     print -u 2 "$LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3"
   fi
   $LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3
 else
-  while (( $# > 0 ))
+  while $(( $# > 0 ))
   do
-    if [[ -f $1 ]]
+    if [ -f $1 ]
     then
-      if [[ -n $VERBOSE ]]
+      if [ -n $VERBOSE ]
       then
         print -u 2 "$LAYOUT -Goverlap=prism $FLAGS1 $1 | gvmap $FLAGS2 | neato -n2 $FLAGS3"
       fi