-
Notifications
You must be signed in to change notification settings - Fork 8
/
mvni.sh
51 lines (33 loc) · 962 Bytes
/
mvni.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
function scpSLF4J() {
echo ${ARGS}
SOURCE=/home/ceki/slf4j-site/target/site
pushd $SOURCE
#i=0;
for file in ${ARGS}
do
echo "scp ${file} yvo.qos.ch:/var/www/www.slf4j.org/htdocs/${file}";
scp ${file} ge.qos.ch:/var/www/www.slf4j.org/htdocs/${file};
#i=$((i + 1));
done
popd
}
function doRsync() {
echo 'ssh [email protected] "rsync -r -p -z -l --exclude=log/ --delete rsync://ge.qos.ch/www/www.slf4j.org /var/www"'
ssh [email protected] "rsync -r -p -z -l --exclude=log/ --delete rsync://ge.qos.ch/www/www.slf4j.org /var/www"
}
ARGS="${@}"
#echo "a0=${0}"
#echo "a1=${1}"
#echo "a2=${2}"
echo "ARGS=${ARGS}"
echo "This is triggered command. Triggered by ${ARGS}"
echo "JAVA_HOME=$JAVA_HOME"
echo "MAVEN_HOME=${MAVEN_HOME}" #=/java/maven-3.5.2/
MVN_COMMAND=${MAVEN_HOME}/bin/mvn
pushd ~/slf4j-site
echo "======================"
${MVN_COMMAND} install
scpSLF4J;
doRsync;
popd
exit