3f9b65974d
fix ksh-specific constrictions in gvmap.sh script OBS-URL: https://build.opensuse.org/request/show/261983 OBS-URL: https://build.opensuse.org/package/show/graphics/graphviz?expand=0&rev=97
57 lines
1.6 KiB
Diff
57 lines
1.6 KiB
Diff
diff -Ndur graphviz-2.38.0/cmd/gvmap/gvmap.sh graphviz-2.38.0-fix-gvmap/cmd/gvmap/gvmap.sh
|
|
--- graphviz-2.38.0/cmd/gvmap/gvmap.sh 2014-04-13 23:40:25.000000000 +0300
|
|
+++ graphviz-2.38.0-fix-gvmap/cmd/gvmap/gvmap.sh 2014-11-17 05:10:56.554829928 +0200
|
|
@@ -60,41 +60,41 @@
|
|
FLAGS3="$FLAGS3 -o$OPTARG"
|
|
;;
|
|
:)
|
|
- print -u 2 $OPTARG requires a value
|
|
+ echo "$OPTARG requires a value" >&2
|
|
exit 2
|
|
;;
|
|
\? )
|
|
- if [[ "$OPTARG" == '?' ]]
|
|
+ if [ "$OPTARG" = '?' ]
|
|
then
|
|
getopts -a gvmap "$OPTSTR" x '-?'
|
|
exit 0
|
|
else
|
|
- print -u 2 "gvmap: unknown flag $OPTARG - ignored"
|
|
+ echo "gvmap: unknown flag $OPTARG - ignored" >&2
|
|
fi
|
|
;;
|
|
esac
|
|
done
|
|
shift $((OPTIND-1))
|
|
|
|
-if [[ $# == 0 ]]
|
|
+if [ $# = 0 ]
|
|
then
|
|
- if [[ -n $VERBOSE ]]
|
|
+ if [ -n "$VERBOSE" ]
|
|
then
|
|
- print -u 2 "$LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3"
|
|
+ echo "$LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3" >&2
|
|
fi
|
|
$LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3
|
|
else
|
|
- while (( $# > 0 ))
|
|
+ while [ $# -gt 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"
|
|
+ echo "$LAYOUT -Goverlap=prism $FLAGS1 $1 | gvmap $FLAGS2 | neato -n2 $FLAGS3" >&2
|
|
fi
|
|
$LAYOUT -Goverlap=prism $FLAGS1 $1 | gvmap $FLAGS2 | neato -n2 $FLAGS3
|
|
else
|
|
- print -u 2 "gvmap: unknown input file $1 - ignored"
|
|
+ echo "gvmap: unknown input file $1 - ignored" >&2
|
|
fi
|
|
shift
|
|
done
|