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"
|
||||
|
||||
opt=""
|
||||
|
||||
if [[ $# -eq 3 ]]
|
||||
if [ $# -eq 3 ]
|
||||
then
|
||||
opt=$1
|
||||
dir1=$2
|
||||
dir2=$3
|
||||
fi
|
||||
|
||||
if [[ $# -eq 2 ]]
|
||||
if [ $# -eq 2 ]
|
||||
then
|
||||
dir1=$1
|
||||
dir2=$2
|
||||
fi
|
||||
|
||||
if [[ $# -gt 3 ]] || [[ $# -lt 2 ]]
|
||||
if [ $# -gt 3 ] || [ $# -lt 2 ]
|
||||
then
|
||||
echo usage: [bufr_compare options] bufr_compare_dir directory1 directory2
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue