-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux2win_all
executable file
·105 lines (70 loc) · 2.03 KB
/
linux2win_all
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/sh
LANG=C
LINUX_TOP=../JunkBox_Lib/C++Lib
#LINUX_TOP=../../linux/JunkBox_Lib/C++Lib
WIN_TOP=.
BASICLIB_CPP=`(cd $LINUX_TOP && ls BasicLib/*.cpp)`
BASICLIB_H=`(cd $LINUX_TOP && ls BasicLib/*.h)`
EXTENDLIB_CPP=`(cd $LINUX_TOP && ls ExtendLib/*.cpp)`
EXTENDLIB_H=`(cd $LINUX_TOP && ls ExtendLib/*.h)`
GRAPHLIB_CPP=`(cd $LINUX_TOP && ls GraphLib/*.cpp)`
GRAPHLIB_H=`(cd $LINUX_TOP && ls GraphLib/*.h)`
BREPLIB_CPP=`(cd $LINUX_TOP && ls BREPLib/*.cpp)`
BREPLIB_H=`(cd $LINUX_TOP && ls BREPLib/*.h)`
MATHLIB_CPP=`(cd $LINUX_TOP && ls MathLib/*.cpp)`
MATHLIB_H=`(cd $LINUX_TOP && ls MathLib/*.h)`
NILIB_CPP=`(cd $LINUX_TOP && ls NiLib/*.cpp)`
NILIB_H=`(cd $LINUX_TOP && ls NiLib/*.h)`
MESHLIB_CPP=`(cd $LINUX_TOP && ls MeshLib/*.cpp)`
MESHLIB_H=`(cd $LINUX_TOP && ls MeshLib/*.h)`
BASICLIB_LIB_C=`(cd $LINUX_TOP && ls BasicLib/Lib/*.c)`
BASICLIB_LIB_H=`(cd $LINUX_TOP && ls BasicLib/Lib/*.h)`
EXTENDLIB_XLIB_C=`(cd $LINUX_TOP && ls ExtendLib/xLib/*.c)`
EXTENDLIB_XLIB_H=`(cd $LINUX_TOP && ls ExtendLib/xLib/*.h)`
copy2win()
{
LF=$LINUX_TOP/$1
WF=$WIN_TOP/$2
if [ ! -f $WF ]; then
return
fi
cp -f $LF $WF
}
diffwin()
{
LF=$LINUX_TOP/$1
WF=$WIN_TOP/$1
if [ ! -f $WF ]; then
return
fi
diff -q $LF $WF | awk -F" " '{print $4}'
}
diffwin_c()
{
LF=$LINUX_TOP/$1
WF=`echo $WIN_TOP/$1 | sed s/\.c$/\.cpp/`
if [ ! -f $WF ]; then
return
fi
diff -q $LF $WF | awk -F" " '{print $4}' | sed s/\.cpp$/\.c/
}
diffwin_all()
{
for LN in $MESHLIB_H $NILIB_H $MATHLIB_H $EXTENDLIB_H $BASICLIB_H $GRAPHLIB_H $BREPLIB_H ; do
diffwin $LN
done
for LN in $MESHLIB_CPP $NILIB_CPP $MATHLIB_CPP $EXTENDLIB_CPP $BASICLIB_CPP $GRAPHLIB_CPP $BREPLIB_CPP ; do
diffwin $LN
done
for LN in $BASICLIB_LIB_H $EXTENDLIB_XLIB_H ; do
diffwin $LN
done
for LN in $BASICLIB_LIB_C $EXTENDLIB_XLIB_C ; do
diffwin_c $LN
done
}
diffwin_all
for LN in `diffwin_all` ; do
WN=`echo $LN | sed s/\.c$/\.cpp/`
copy2win $LN $WN
done