mirror of https://github.com/ecmwf/eccodes.git
tools/bufs_compare_dir: Make compatible with POSIX sh
`bufr_compare_dir` is the only installed script that requires `ksh`. With minor changes it is possible to make this script compatible with standard POSIX sh. Removing the need to use `ksh` greatly simplifies many aspects of the efforts needed to package, install and maintain eccodes in distributions like Debian. See: https://bugs.debian.org/1078095
This commit is contained in:
parent
db8d72582e
commit
7d8a2b65fd
|
@ -1,23 +1,23 @@
|
||||||
#!/bin/ksh
|
#!/bin/sh
|
||||||
|
|
||||||
keys="md5Structure,md5Data,typicalDate,typicalTime,rdbType,rdbSubtype,ident,satelliteID,localLatitude,localLongitude,localLatitude1,localLongitude1,localLatitude2,localLongitude2"
|
keys="md5Structure,md5Data,typicalDate,typicalTime,rdbType,rdbSubtype,ident,satelliteID,localLatitude,localLongitude,localLatitude1,localLongitude1,localLatitude2,localLongitude2"
|
||||||
|
|
||||||
opt=""
|
opt=""
|
||||||
|
|
||||||
if [[ $# -eq 3 ]]
|
if [ $# -eq 3 ]
|
||||||
then
|
then
|
||||||
opt=$1
|
opt=$1
|
||||||
dir1=$2
|
dir1=$2
|
||||||
dir2=$3
|
dir2=$3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $# -eq 2 ]]
|
if [ $# -eq 2 ]
|
||||||
then
|
then
|
||||||
dir1=$1
|
dir1=$1
|
||||||
dir2=$2
|
dir2=$2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $# -gt 3 ]] || [[ $# -lt 2 ]]
|
if [ $# -gt 3 ] || [ $# -lt 2 ]
|
||||||
then
|
then
|
||||||
echo usage: [bufr_compare options] bufr_compare_dir directory1 directory2
|
echo usage: [bufr_compare options] bufr_compare_dir directory1 directory2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue