summaryrefslogtreecommitdiff
path: root/libjava/classpath/lib/copy-vmresources.sh.in
blob: 8dc8c0f5b4d5c9a3f8ef167fc0ce0feb7b6d0266 (plain)
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
#! @SHELL@
# @configure_input@

top_srcdir=@top_srcdir@
vmdirs=`echo "@vm_classes@" | sed 's%:% %g'`
destMetaDir=`pwd`/META-INF
destResDir=`pwd`

for p in ${vmdirs}; do
	if test -d $p/META-INF; then
		(cd $p/META-INF; 
		 dirs=`find . -name "CVS" -prune -o -type d -print`;
		 for u in ${dirs}; do
			 @mkdir_p@ ${destMetaDir}/${u};
		 done;
		 files=`find . -name "CVS" -prune -o -name "*.in" -prune -o -type f -print`;
		 for u in ${files}; do
			 cp ${u} ${destMetaDir}/${u};
		 done
		 );
	fi;

	(cd ${p};
	  resfiles=`find . -name "*.properties"`
	  resdirs=
	  for i in ${resfiles}; do 
		  a=`basename ${i}`; 
		  b=`echo ${i} | sed "s%${a}%%g"`; 
	  	  resdirs="${resdirs} ${b}";
	  done;
  	  resnewdirs=`echo ${resdirs} | uniq`;

  	  for u in ${resnewdirs}; do
  		  @mkdir_p@ ${destResDir}/${u};
  	  done
  
	  for f in ${resfiles}; do
		echo ${f} ${destResDir}/${f};
	  done
	  )
done