Skip to content

Commit dc85081

Browse files
author
SanderRoomus
authored
Merge pull request #21 from AquaQAnalytics/TAG_install
proper variables and installlatest script
2 parents a68235c + 8301422 commit dc85081

File tree

2 files changed

+86
-1
lines changed

2 files changed

+86
-1
lines changed

installlatest.sh

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#!/bin/bash
2+
3+
#example usage:
4+
#bash installlatest.sh
5+
6+
get_latest_release() {
7+
curl --silent "https://api.github.com/repos/$1/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")'
8+
}
9+
10+
wget https://raw.githubusercontent.com/AquaQAnalytics/TorQ/master/installtorqapp.sh
11+
12+
torq_latest=`get_latest_release "AquaQAnalytics/TorQ"`
13+
14+
if [[ $torq_latest == *?.?.? ]] || [[ $torq_latest == *?.??.?? ]];
15+
then
16+
echo "============================================================="
17+
echo "Latest TorQ release"
18+
echo $torq_latest
19+
echo "Getting the latest TorQ .tar.gz file"
20+
echo "============================================================="
21+
22+
23+
else
24+
echo "the tag for Torq release: "
25+
echo $torq_latest
26+
echo "Is not in the right format, exiting script."
27+
exit 1
28+
fi
29+
30+
wget --content-disposition https://github.com/AquaQAnalytics/TorQ/archive/$torq_latest.tar.gz
31+
32+
echo $torq_latest
33+
34+
if [ "${torq_latest%%v*}" ]
35+
then
36+
echo "tag doesn't start with v"
37+
else
38+
torq_latest=${torq_latest#?}
39+
fi
40+
41+
echo $torq_latest
42+
43+
torq_taq_latest=`get_latest_release "AquaQAnalytics/TorQ-TAQ"`
44+
45+
echo "============================================================="
46+
echo "Latest TorQ-TAQ release"
47+
echo $torq_taq_latest
48+
echo "Getting the latest TorQ-TAQ .tar.gz file"
49+
echo "============================================================="
50+
51+
if [[ $torq_taq_latest == *?.?.? ]] || [[ $torq_taq_latest == *?.??.?? ]];
52+
then
53+
echo "============================================================="
54+
echo "Latest TorQ-TAQ release"
55+
echo $torq_taq_latest
56+
echo "Getting the latest TorQ-TAQ .tar.gz file"
57+
echo "============================================================="
58+
59+
60+
else
61+
echo "the tag for Torq release: "
62+
echo $torq_taq_latest
63+
echo "Is not in the right format, exiting script."
64+
exit 1
65+
fi
66+
67+
68+
wget --content-disposition https://github.com/AquaQAnalytics/TorQ-TAQ/archive/$torq_taq_latest.tar.gz
69+
70+
echo $torq_taq_latest
71+
72+
if [ "${torq_taq_latest%%v*}" ]
73+
then
74+
echo "tag doesn't start with v"
75+
else
76+
torq_taq_latest=${torq_taq_latest#?}
77+
fi
78+
79+
echo $torq_taq_latest
80+
81+
echo "Files downloaded. Executing install script"
82+
83+
bash installtorqapp.sh --torq TorQ-$torq_latest.tar.gz --releasedir deploy --data datatemp --installfile TorQ-TAQ-$torq_taq_latest.tar.gz
84+
85+
mkdir -p datatemp/filedrop

setenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export KDBLIB=${TORQHOME}/lib
2222
export KDBHDB=${TORQDATAHOME}/hdb
2323
export TORQTAQTEMPDB=${TORQDATAHOME}}/tempdb
2424
export TORQTAQMERGED=${TORQDATAHOME}}/merged
25-
export TORQTAQFILEDROP=${TORQHOME}/filedrop
25+
export TORQTAQFILEDROP=${TORQDATAHOME}/filedrop
2626
export KBDTESTS=${TORQHOME}/tests
2727
# set rlwrap and qcon paths for use in torq.sh qcon flag functions
2828
export RLWRAP="rlwrap"

0 commit comments

Comments
 (0)