-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconvert-to-maven-jpdfbookmarks_core.sh
executable file
·73 lines (56 loc) · 2.37 KB
/
convert-to-maven-jpdfbookmarks_core.sh
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
#!/bin/sh
# Steps to refactor jpdfbookmarks-src-2.5.2 to maven architecture
export BASE=`pwd`
#### module jpdfbookmarks_core ####
# Create Maven Standard Directory Layout
mkdir -p $BASE/jpdfbookmarks_core/src/main/java
mkdir -p $BASE/jpdfbookmarks_core/src/main/resources
# module jpdfbookmarks_core
cd $BASE/jpdfbookmarks_core/src
# split the source code into two directories: java and resources
# copy the source code into two directories: java and resources
cp -R it main/java/
cp -R it main/resources/
# there will be no java & form files in resources directory ,
# so delete them all
cd $BASE/jpdfbookmarks_core/src/main/resources/
find . -type f -iname \*.java -delete
find . -type f -iname \*.form -delete
# delete empty directory
find . -empty -type d -delete
# There will be no jpg, png, gif, ico, txt, properties, html, afm files in the java directory,
# so delete them
cd $BASE/jpdfbookmarks_core/src/main/java/
find . -type f -iname \*.jpg -delete
find . -type f -iname \*.png -delete
find . -type f -iname \*.gif -delete
find . -type f -iname \*.ico -delete
find . -type f -iname \*.txt -delete
find . -type f -iname \*.properties -delete
find . -type f -iname \*.html -delete
find . -type f -iname \*.afm -delete
# delete empty directory
find . -empty -type d -delete
# delete src/it directories
cd $BASE/jpdfbookmarks_core/src
rm -R ./it
# delete unnecessary directories and files.
cd $BASE/jpdfbookmarks_core/
rm -R nbproject
rm -R test
rm -R others
rm build.xml
rm manifest.mf
# copy the Packaging
# jpdfbookmarks jpdfbookmarks_cli link_this_in_linux_path.sh link_this_in_linux_path_cli.sh
# into the jpdfbookmarks_core/src/main/scripts directory
mkdir -p $BASE/jpdfbookmarks_core/src/main/scripts
cd $BASE/jpdfbookmarks_core/src/main/scripts
cp $BASE/Packaging/jpdfbookmarks $BASE/jpdfbookmarks_core/src/main/scripts/
cp $BASE/Packaging/jpdfbookmarks_cli $BASE/jpdfbookmarks_core/src/main/scripts/
cp $BASE/Packaging/link_this_in_linux_path.sh $BASE/jpdfbookmarks_core/src/main/scripts/
cp $BASE/Packaging/link_this_in_linux_path_cli.sh $BASE/jpdfbookmarks_core/src/main/scripts/
cp -R $BASE/Packaging/launch4j $BASE/jpdfbookmarks_core/src/main/
mkdir -p $BASE/jpdfbookmarks_core/src/main/images
cp $BASE/Packaging/jpdfbookmarks.ico $BASE/jpdfbookmarks_core/src/main/images/
cp $BASE/jpdfbookmarks_graphics/artwork/jpdfbookmarks.png $BASE/jpdfbookmarks_core/src/main/images/