Revision 735 tmp/trunk/org.txm.setups/getSharedFiles.sh

getSharedFiles.sh (revision 735)
5 5
SHAREDALL="$SHARED/all"
6 6
SCRIPTCOPYDIR="$SHAREDALL/scripts"
7 7

  
8
echo "reset the shared/all directory..."
9
rm -rf "$SHAREDALL" &&
10
svn update
11

  
12
if [ ! -d "$SCRIPTCOPYDIR" ]; then
13
	echo "** Scripts copy: failed to reset the shared/all directory."
14
	exit 1;
15
fi
16

  
17
IMPORTERPACKAGE=/src/groovy/org/txm/importer
18
ALCESTE=$IMPORTERPACKAGE/alceste/alcesteLoader.groovy
19
DISCOURS=$IMPORTERPACKAGE/discours/discoursLoader.groovy
20
BFM=$IMPORTERPACKAGE/bfm/bfmLoader.groovy
21
FRANTEXT=$IMPORTERPACKAGE/frantext/frantextLoader.groovy
22
HYPERBASE=$IMPORTERPACKAGE/hyperbase/hyperbaseLoader.groovy
23
TXT=$IMPORTERPACKAGE/txt/txtLoader.groovy
24
XML=$IMPORTERPACKAGE/xml/xmlLoader.groovy
25
FACTIVA=$IMPORTERPACKAGE/factiva/factivaLoader.groovy
26
FACTIVATXT=$IMPORTERPACKAGE/factiva/factivamailLoader.groovy
27
XMLTXM=$IMPORTERPACKAGE/xmltxm/xmltxmLoader.groovy
28
TRANSCRIBER=$IMPORTERPACKAGE/transcriber/transcriberLoader.groovy
29
TMX=$IMPORTERPACKAGE/tmx/tmxLoader.groovy
30
DOC=$IMPORTERPACKAGE/doc/docLoader.groovy
31
WTC=$IMPORTERPACKAGE/wtc/wtcLoader.groovy
32
#LIMSI=$IMPORTERPACKAGE/limsi/limsiLoader.groovy
33

  
34
echo $SCRIPTCOPYDIR
35

  
36
mkdir "$SCRIPTCOPYDIR/import/"
37
# get all xxxxLoader.groovy sccripts
38
cp -v "$TOOLBOXDIRECTORY$ALCESTE" "$SCRIPTCOPYDIR/import/" && \
39
cp -v "$TOOLBOXDIRECTORY$DISCOURS" "$SCRIPTCOPYDIR/import/" && \
40
cp -v "$TOOLBOXDIRECTORY$BFM" "$SCRIPTCOPYDIR/import/" && \
41
cp -v "$TOOLBOXDIRECTORY$FRANTEXT" "$SCRIPTCOPYDIR/import/" && \
42
cp -v "$TOOLBOXDIRECTORY$HYPERBASE" "$SCRIPTCOPYDIR/import/" && \
43
cp -v "$TOOLBOXDIRECTORY$TXT" "$SCRIPTCOPYDIR/import/" && \
44
cp -v "$TOOLBOXDIRECTORY$XML" "$SCRIPTCOPYDIR/import/" && \
45
cp -v "$TOOLBOXDIRECTORY$FACTIVA" "$SCRIPTCOPYDIR/import/" && \
46
cp -v "$TOOLBOXDIRECTORY$FACTIVATXT" "$SCRIPTCOPYDIR/import/" && \
47
cp -v "$TOOLBOXDIRECTORY$XMLTXM" "$SCRIPTCOPYDIR/import/" && \
48
cp -v "$TOOLBOXDIRECTORY$TRANSCRIBER" "$SCRIPTCOPYDIR/import/" && \
49
cp -v "$TOOLBOXDIRECTORY$DOC" "$SCRIPTCOPYDIR/import/" && \
50
cp -v "$TOOLBOXDIRECTORY$TMX" "$SCRIPTCOPYDIR/import/" && \
51
cp -v "$TOOLBOXDIRECTORY$WTC" "$SCRIPTCOPYDIR/import/"
52
#cp -v "$TOOLBOXDIRECTORY$LIMSI" "$SCRIPTCOPYDIR/import/"
53

  
8
# copy TXM sample corpora files files
9
svn update "${SVNDIR}"
10
mkdir  "$SHAREDALL/samples"
11
cp -f "${SVNDIR}/corpora/tdm80j" "$SHAREDALL/samples/tdm80j"
54 12
if [ $? != 0 ]; then
55
	echo "** Loader scripts copy: copy failed"
13
	echo "** TXM REFMAN copy failed"
56 14
	exit 1;
57 15
fi
58 16

  
59
#copy Macros
60
mkdir "$SCRIPTCOPYDIR/macro/"
61
mkdir "$SCRIPTCOPYDIR/macro/org/"
62
mkdir "$SCRIPTCOPYDIR/macro/org/txm/"
63
#mkdir "$SCRIPTCOPYDIR/macro/org/txm/annotation/"
64

  
65
rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/macro/" "$SCRIPTCOPYDIR/macro/org/txm/macro" &&
66
#rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/importer/europress/" "$SCRIPTCOPYDIR/macro" &&
67
#rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/annotation/" "$SCRIPTCOPYDIR/macro/org/txm/annotation" &&
68
#rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/importer/transcription/" "$SCRIPTCOPYDIR/macro/org/txm/importer/transcription"
69
if [ $? != 0 ]; then
70
	echo "** Macros copy failed"
71
	exit 1;
72
fi
73

  
74
#copy Groovy samples scripts
75
mkdir "$SCRIPTCOPYDIR/samples/groovy"
76
mkdir "$SCRIPTCOPYDIR/samples/groovy/org" &&
77
mkdir "$SCRIPTCOPYDIR/samples/groovy/org/txm" &&
78
mkdir "$SCRIPTCOPYDIR/samples/groovy/org/txm/export" &&
79
mkdir "$SCRIPTCOPYDIR/samples/groovy/org/txm/functions" && 
80
mkdir "$SCRIPTCOPYDIR/samples/groovy/org/txm/importer" &&
81
mkdir "$SCRIPTCOPYDIR/samples/groovy/org/txm/sw" &&
82
#mkdir "$SCRIPTCOPYDIR/samples/groovy/org/txm/tal" &&
83
rsync -r  --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/export"/* "$SCRIPTCOPYDIR/samples/groovy/org/txm/export" && 
84
rsync -r  --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/functions"/* "$SCRIPTCOPYDIR/samples/groovy/org/txm/functions" &&
85
rsync -r  --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/importer"/* "$SCRIPTCOPYDIR/samples/groovy/org/txm/importer" &&
86
rsync -r  --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/sw"/* "$SCRIPTCOPYDIR/samples/groovy/org/txm/sw" &&
87
rsync -r  --exclude '.svn' "$TOOLBOXDIRECTORY/src/groovy/org/txm/tal"/* "$SCRIPTCOPYDIR/samples/groovy/org/txm/tal" &&
88
if [ $? != 0 ]; then
89
	echo "** Groovy samples copy failed"
90
	exit 1;
91
fi
92

  
93
#copy R samples scripts
94
rsync -r  --exclude '.svn' "$TOOLBOXDIRECTORY/src/R/"* "$SCRIPTCOPYDIR/samples/R"
95
if [ $? != 0 ]; then
96
	echo "** R samples copy failed"
97
	exit 1;
98
fi
99

  
100
# copy XSL files
101
rsync -r  --exclude '.svn' "$TOOLBOXDIRECTORY/res/org/txm/xml/xsl/"* "$SHAREDALL/xsl"
102
if [ $? != 0 ]; then
103
	echo "** Loader xsl copy: copy failed"
104
	exit 1;
105
fi
106

  
107
# copy CSS files
108

  
109
rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/res/org/txm/css/txm.css" "$SHAREDALL/css/" &&
110
rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/res/org/txm/css/tmx.css" "$SHAREDALL/css/" &&  
111
rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/res/org/txm/css/doc.css" "$SHAREDALL/css/" && 
112
rsync -r --exclude '.svn' "$TOOLBOXDIRECTORY/res/org/txm/css/transcriber.css" "$SHAREDALL/css/"
113
if [ $? != 0 ]; then
114
	echo "** css copy failed"
115
	exit 1;
116
fi
117

  
118 17
# copy TXM documentation files files
119
svn update "${SVNDOCTRUNK}"
18
mkdir "$SHAREDALL/doc"
120 19
cp -f "${SVNDOCTRUNK}/user manuals/txm-manual-fr.pdf" "$SHAREDALL/doc/Manuel de TXM 0.7 FR.pdf"
121 20
if [ $? != 0 ]; then
122 21
	echo "** TXM REFMAN copy failed"
123 22
	exit 1;
124 23
fi
125 24

  
126
chmod -R +r "$SHAREDALL"/*
127
find "$SHAREDALL" -type d -exec chmod +rx {} \;
128

  
129
# remove dev scripts
130
rm -f "$SCRIPTCOPYDIR/samples/groovy/ReleaseFunctionsValidation.groovy"
131
rm -f "$SCRIPTCOPYDIR/samples/groovy/ReleaseLoadersValidation.groovy"
132
rm -rf "$SCRIPTCOPYDIR/samples/groovy/org/txm/setup"
133
rm -rf "$SCRIPTCOPYDIR/samples/groovy/org/txm/i18n"
134
rm -rf "$SCRIPTCOPYDIR/samples/groovy/org/txm/svn"
135
rm -f "$SCRIPTCOPYDIR/samples/groovy/org/txm/AntTest.groovy"
136
rm -f "$SCRIPTCOPYDIR/samples/groovy/org/txm/Build.java"
137
rm -f "$SCRIPTCOPYDIR/samples/groovy/org/txm/Build2.java"
138
rm -f "$SCRIPTCOPYDIR/samples/groovy/org/txm/Build3.groovy"
139

  
140 25
echo "** Shared files copy: success !"

Also available in: Unified diff