-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopyToLocalRepo.sh
More file actions
executable file
·94 lines (69 loc) · 2.58 KB
/
Copy pathcopyToLocalRepo.sh
File metadata and controls
executable file
·94 lines (69 loc) · 2.58 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
#Usage: copyToLocalRepo.sh <version number>
#e.g. copyToLocalRepo.s 1.8.5
if [ ! $1 ]
then
echo "Please provide a version number"
exit -1
fi
sha1() {
if [ ! -x sha1 ]
then
#probably cygwin
sha1sum "$@" | awk '{print $1}'
else
sha1 "$@"
fi
}
md5() {
if [ ! -x md5 ]
then
#probably cygwin
md5sum "$@" | awk '{print $1}'
else
md5 "$@"
fi
}
BASE_DIR=`pwd`
# Copy hash CubicTest JARs to local repo:
CUBICTEST_REPO_DIR=~/.m2/repository/org/cubictest/cubictest/$1
if [ ! -d "$CUBICTEST_REPO_DIR" ]
then
mkdir -p "$CUBICTEST_REPO_DIR"
fi
cd $BASE_DIR/CubicTestPlugin
cp cubictest-$1.jar "$CUBICTEST_REPO_DIR"
sha1 cubictest-$1.jar | awk '{print $1}' > "$CUBICTEST_REPO_DIR/cubictest-$1.jar.sha1"
md5 cubictest-$1.jar | awk '{print $1}' > "$CUBICTEST_REPO_DIR/cubictest-$1.jar.md5"
cp cubictest-$1.pom "$CUBICTEST_REPO_DIR"
sha1 cubictest-$1.pom | awk '{print $1}' > "$CUBICTEST_REPO_DIR/cubictest-$1.pom.sha1"
md5 cubictest-$1.pom | awk '{print $1}' > "$CUBICTEST_REPO_DIR/cubictest-$1.pom.md5"
# Copy and hash Selenium exporter JARs to local repo:
SELENIUM_EXPORTER_DIR=~/.m2/repository/org/cubictest/selenium-exporter/$1
if [ ! -d "$SELENIUM_EXPORTER_DIR" ]
then
mkdir -p "$SELENIUM_EXPORTER_DIR"
fi
cd $BASE_DIR/CubicTestSeleniumExporter
cp selenium-exporter-$1.jar "$SELENIUM_EXPORTER_DIR"
sha1 selenium-exporter-$1.jar | awk '{print $1}' > "$SELENIUM_EXPORTER_DIR/selenium-exporter-$1.jar.sha1"
md5 selenium-exporter-$1.jar | awk '{print $1}' > "$SELENIUM_EXPORTER_DIR/selenium-exporter-$1.jar.md5"
cp selenium-exporter-$1.pom "$SELENIUM_EXPORTER_DIR"
sha1 selenium-exporter-$1.pom | awk '{print $1}' > "$SELENIUM_EXPORTER_DIR/selenium-exporter-$1.pom.sha1"
md5 selenium-exporter-$1.pom | awk '{print $1}' > "$SELENIUM_EXPORTER_DIR/selenium-exporter-$1.pom.md5"
# Copy hash CubicTest Selenium RC JARs to local repo:
SELENIUM_RC_DIR=~/.m2/repository/org/cubictest/cubictest-selenium-rc/$1
if [ ! -d "$SELENIUM_RC_DIR" ]
then
mkdir -p "$SELENIUM_RC_DIR"
fi
cd $BASE_DIR/CubicTestSeleniumExporterServer
cp cubictest-selenium-rc-$1.jar "$SELENIUM_RC_DIR"
sha1 cubictest-selenium-rc-$1.jar | awk '{print $1}' > "$SELENIUM_RC_DIR/cubictest-selenium-rc-$1.jar.sha1"
md5 cubictest-selenium-rc-$1.jar | awk '{print $1}' > "$SELENIUM_RC_DIR/cubictest-selenium-rc-$1.jar.md5"
cp cubictest-selenium-rc-$1.pom "$SELENIUM_RC_DIR"
sha1 cubictest-selenium-rc-$1.pom | awk '{print $1}' > "$SELENIUM_RC_DIR/cubictest-selenium-rc-$1.pom.sha1"
md5 cubictest-selenium-rc-$1.pom | awk '{print $1}' > "$SELENIUM_RC_DIR/cubictest-selenium-rc-$1.pom.md5"
#Done:
echo Jars copied to local m2 repo.
cd $BASE_DIR