代码拉取完成,页面将自动刷新
#!/bin/sh
# create geojson's from DWG or DXF with dwgread -OGeoJSON
srcdir="@srcdir@"
top_builddir="@top_builddir@"
CFLAGS="@CFLAGS@"
timeout="@TIMEOUT_30@"
TESTS_ENVIRONMENT="@AM_TESTS_ENVIRONMENT@"
if [ -n "$VALGRIND" ] && [ -n "$LOG_COMPILER" ]; then
TESTPROG="$LOG_COMPILER $LOG_FLAGS"
elif [ -n "@WINE@" ]; then
TESTPROG="@WINE@"
elif [ -n "$TESTS_ENVIRONMENT" ]; then
TESTPROG="$TESTS_ENVIRONMENT @LTEXEC@"
else
TESTPROG="@LTEXEC@"
fi
case "$CFLAGS" in
*-DDEBUG_CLASSES*) timeout="" ;;
*) ;;
esac
make -s -C src
make -s -C programs dwgread@EXEEXT@
if [ -n "@DSYMUTIL@" ]; then
@DSYMUTIL@ programs/dwgread
fi
v=-v3
# dummy to please shellcheck
test -z "$v" && echo $top_builddir
out=
ob="$b"
ext=
gerr=0
for d in "$@"; do
case $d in
-v*)
v="$d"
;;
*)
if [ ! -f "$d" ]; then
if [ -f "$srcdir/test/test-data/$d" ]; then
d="$srcdir/test/test-data/$d"
elif [ -f "$srcdir/test/test-data/$d.dwg" ]; then
d="$srcdir/test/test-data/$d.dwg"
ext=dwg
elif [ -f "$srcdir/test/test-data/$d.dxf" ]; then
d="$srcdir/test/test-data/$d.dxf"
ext=dxf
fi
fi
xd=$(dirname "$d")
dir=_$(basename "$xd")
[ "$dir" = "_test-data" ] && dir=""
[ "$dir" = "_td" ] && dir=""
[ "$dir" = "_." ] && dir=""
if [ -z "$ext" ]; then
case $(basename "$d") in
*.dwg)
ext=dwg
b=$(basename "$d" .$ext)
;;
*.DWG)
ext=dwg
b=$(basename "$d" .DWG)
;;
*.dxf)
ext=dxf
b=$(basename "$d" .$ext)
;;
*.DXF)
ext=dxf
b=$(basename "$d" .DXF)
;;
*.json)
ext=json
b=$(basename "$d" .$ext)
;;
*.JSON)
ext=json
b=$(basename "$d" .JSON)
;;
*)
ext=dwg
b=$(basename "$d" .$ext)
echo "Assume DWG file for $d"
;;
esac
fi
log="$b$dir.log"
out="$b$dir.geojson"
echo "$timeout $TESTPROG programs/dwgread $v -OGeoJSON -o $out $d 2>$log"
# shellcheck disable=SC2086
$timeout $TESTPROG programs/dwgread "$v" -OGeoJSON -o "$out" "$d" 2>"$log"
err=$?
[ $err -gt $gerr ] && gerr=$err
tail -n2 "$log"
;;
esac
done
v=
b=$ob
if [ $gerr -gt 128 ]; then exit 1; fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。