forked from LibreDWG/libredwg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdxf.in
38 lines (36 loc) · 991 Bytes
/
dxf.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# create -v3 logs and dxf's from dwg's with dwg2dxf
srcdir="@srcdir@"
make -s -j4 -C src
make -s -j4 -C programs dwg2dxf
@DSYMUTIL@ programs/dwg2dxf
v=-v3
y=
for d in "$@"; do
case $d in
-y) y="-y"
;;
-v*) v=$d
;;
*)
if [ ! -f $d ]; then
if [ -f $srcdir/test/test-data/$d ]
then
d=$srcdir/test/test-data/$d;
else
if [ -f $srcdir/test/test-data/$d.dwg ]
then
d=$srcdir/test/test-data/$d.dwg
fi
fi
fi
dir=_$(basename `dirname "$d"`)
if [ x$dir = x_test-data ]; then dir=""; fi
if [ x$dir = x_td ]; then dir=""; fi
log=`basename "$d" .dxf`$dir.log
dxf=`basename "$d" .dxf`$dir.dxf
echo programs/dwg2dwg $y $v -o "$dxf" "$d" 2\>$log
@TIMEOUT_10@ @LTEXEC@ programs/dwg2dxf $y $v -o "$dxf" "$d" 2>$log
;;
esac
done