-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathmakeBoot4.sh
More file actions
39 lines (33 loc) · 881 Bytes
/
makeBoot4.sh
File metadata and controls
39 lines (33 loc) · 881 Bytes
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
#!/bin/bash
# Generate a Boot4-compatible source from the primary tree (JMS3/Boot3):
#
curdir=`pwd`
in="$1"
out="$2"
if [ -z "$in" -o -z "$out" ]
then
echo "Usage: makeBoot4.sh inDir outDir"
exit 1
fi
# echo "Copying files for Boot4 build from $in to $out"
if [ ! -d $in ]
then
echo "Cannot find input directory $in"
exit 1
fi
mkdir $out >/dev/null 2>&1
cd $in
# Create the structure
find . -type f |\
grep -v bin/ |\
cpio -upad $out
# And recopy the Java files doing any modifications as we go
find . -type f -name "*.java" |\
grep -v bin/ |\
while read f
do
# Boot4 moved a bunch of imported classes
cat $f |\
sed "s/org.springframework.boot.autoconfigure.jms/org.springframework.boot.jms.autoconfigure/g" |\
sed "s/org.springframework.boot.autoconfigure.transaction.jta/org.springframework.boot.transaction.jta.autoconfigure/g" > $out/$f
done