forked from LibreDWG/libredwg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdwg.in
40 lines (38 loc) · 1.01 KB
/
dwg.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
39
40
#!/bin/sh
# create -v3 logs and dwg's with dxf2dwg
srcdir="@srcdir@"
make -s -j4 -C src
make -s -j4 -C programs dxf2dwg
@DSYMUTIL@ programs/dxf2dwg
v=-v3
y=
for d in "$@"; do
case $d in
-y) y="$y -y"
;;
--force-free) y="$y $d"
;;
-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.dxf ]
then
d=$srcdir/test/test-data/$d.dxf
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.dxf.log
dwg=`basename "$d" .dxf`$dir.dwg
echo programs/dxf2dwg $y $v -o "$dwg" "$d" 2\>$log
@TIMEOUT_10@ @LTEXEC@ programs/dxf2dwg $y $v -o "$dwg" "$d" 2>$log
;;
esac
done