2009-01-10 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / libjava / classpath / lib / copy-vmresources.sh.in
blob8dc8c0f5b4d5c9a3f8ef167fc0ce0feb7b6d0266
1 #! @SHELL@
2 # @configure_input@
4 top_srcdir=@top_srcdir@
5 vmdirs=`echo "@vm_classes@" | sed 's%:% %g'`
6 destMetaDir=`pwd`/META-INF
7 destResDir=`pwd`
9 for p in ${vmdirs}; do
10 if test -d $p/META-INF; then
11 (cd $p/META-INF;
12 dirs=`find . -name "CVS" -prune -o -type d -print`;
13 for u in ${dirs}; do
14 @mkdir_p@ ${destMetaDir}/${u};
15 done;
16 files=`find . -name "CVS" -prune -o -name "*.in" -prune -o -type f -print`;
17 for u in ${files}; do
18 cp ${u} ${destMetaDir}/${u};
19 done
21 fi;
23 (cd ${p};
24 resfiles=`find . -name "*.properties"`
25 resdirs=
26 for i in ${resfiles}; do
27 a=`basename ${i}`;
28 b=`echo ${i} | sed "s%${a}%%g"`;
29 resdirs="${resdirs} ${b}";
30 done;
31 resnewdirs=`echo ${resdirs} | uniq`;
33 for u in ${resnewdirs}; do
34 @mkdir_p@ ${destResDir}/${u};
35 done
37 for f in ${resfiles}; do
38 echo ${f} ${destResDir}/${f};
39 done
41 done