~ubuntu-branches/ubuntu/trusty/rheolef/trusty

« back to all changes in this revision

Viewing changes to config/zdiff

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito
  • Date: 2012-04-06 09:12:21 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120406091221-m58me99p1nxqui49
Tags: 6.0-1
* New upstream release 6.0 (major changes):
  - massively distributed and parallel support
  - full FEM characteristic method (Lagrange-Gakerkin method) support
  - enhanced users documentation 
  - source code supports g++-4.7 (closes: #667356)
* debian/control: dependencies for MPI distributed solvers added
* debian/rules: build commands simplified
* debian/librheolef-dev.install: man1/* to man9/* added
* debian/changelog: package description rewritted (closes: #661689)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
3
 
 
4
 
# Zcmp and zdiff are used to invoke the cmp or the  diff  pro-
5
 
# gram  on compressed files.  All options specified are passed
6
 
# directly to cmp or diff.  If only 1 file is specified,  then
7
 
# the  files  compared  are file1 and an uncompressed file1.gz.
8
 
# If two files are specified, then they are  uncompressed  (if
9
 
# necessary) and fed to cmp or diff.  The exit status from cmp
10
 
# or diff is preserved.
11
 
 
12
 
PATH="/usr/bin:$PATH"; export PATH
13
 
prog=`echo $0 | sed 's|.*/||'`
14
 
case "$prog" in
15
 
  *cmp) comp=${CMP-cmp}   ;;
16
 
  *)    comp=${DIFF-diff} ;;
17
 
esac
18
 
 
 
2
#
 
3
# hack from zdiff in gzip package:
 
4
# fix the buggy exit status when arg == - is read from stdin
 
5
 
6
# Pierre.Saramito@imag.fr
 
7
#
 
8
# date: 28 sept 2011
 
9
#
 
10
prog="zdiff"
 
11
comp="diff"
 
12
TMPDIR=${TMPDIR-"/tmp"}
19
13
OPTIONS=
20
14
FILES=
21
 
for ARG
22
 
do
 
15
for ARG in $*; do
23
16
    case "$ARG" in
24
17
    -)  FILES="$FILES -";;
25
18
    -*) OPTIONS="$OPTIONS $ARG";;
36
29
        exit 1
37
30
fi
38
31
set $FILES
 
32
tmp1="$TMPDIR/zdiff-1-$$"
 
33
tmp2="$TMPDIR/zdiff-2-$$"
39
34
if test $# -eq 1; then
40
35
        FILE=`echo "$1" | sed 's/[-.][zZtga]*$//'`
41
 
        gzip -cd "$1" | $comp $OPTIONS - "$FILE"
 
36
        gzip -d < "$1" > $tmp1
 
37
        $comp $OPTIONS $tmp1 "$FILE"
42
38
        STAT="$?"
43
 
 
 
39
        /bin/rm -f $tmp1
44
40
elif test $# -eq 2; then
45
41
        case "$1" in
46
42
        *[-.]gz* | *[-.][zZ] | *.t[ga]z)
47
43
                case "$2" in
48
44
                *[-.]gz* | *[-.][zZ] | *.t[ga]z)
49
 
                        F=`echo "$2" | sed 's|.*/||;s|[-.][zZtga]*||'`
50
 
                        gzip -cdfq "$2" > /tmp/"$F".$$
51
 
                        gzip -cdfq "$1" | $comp $OPTIONS - /tmp/"$F".$$
52
 
                        STAT="$?"
53
 
                        /bin/rm -f /tmp/"$F".$$;;
54
 
 
55
 
                *)      gzip -cdfq "$1" | $comp $OPTIONS - "$2"
56
 
                        STAT="$?";;
 
45
                        gzip -cdfq "$1" > $tmp1
 
46
                        gzip -cdfq "$2" > $tmp2
 
47
                        $comp $OPTIONS $tmp1 $tmp2
 
48
                        STAT="$?"
 
49
                        /bin/rm -f $tmp1 $tmp2
 
50
                        ;;
 
51
                *) 
 
52
                        gzip -cdfq "$1" > $tmp1
 
53
                        $comp $OPTIONS $tmp1 "$2"
 
54
                        STAT="$?"
 
55
                        /bin/rm -f $tmp1
 
56
                        ;;
57
57
                esac;;
58
58
        *)      case "$2" in
59
59
                *[-.]gz* | *[-.][zZ] | *.t[ga]z)
60
 
                        gzip -cdfq "$2" | $comp $OPTIONS "$1" -
61
 
                        STAT="$?";;
 
60
                        gzip -cdfq "$2" > $tmp2
 
61
                        $comp $OPTIONS "$1" $tmp2
 
62
                        STAT="$?"
 
63
                        /bin/rm -f $tmp2
 
64
                        ;;
62
65
                *)      $comp $OPTIONS "$1" "$2"
63
 
                        STAT="$?";;
 
66
                        STAT="$?"
 
67
                        ;;
64
68
                esac;;
65
69
        esac
66
70
        exit "$STAT"