File tree Expand file tree Collapse file tree 1 file changed +20
-20
lines changed
Expand file tree Collapse file tree 1 file changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -28,33 +28,33 @@ download_and_cmake_install() {
2828 # $2 name of the package
2929 # $3 URL where ${1}.tar.gz can be obtained
3030 # $4 configure options
31- if [ ! -e ${1} / ${ 2} .tar.gz ]; then
31+ if [ ! -e ${2} .tar.gz ]; then
3232 echo " Downloading " ${3} /${1} /${2} .tar.gz" ."
3333 wget -q -O ${2} .tar.gz ${3} /${1} /${2} .tar.gz
34- fi ;
35-
36- if [ ! -e ${2} ]; then
3734 tar -xzf ${2} .tar.gz
35+ fi ;
3836
39- echo " Configuring " ${2} " ."
40- mkdir ${2} _build
41- cd ${2} _build
42- cmake ${4} ../${2}
37+ echo " Configuring " ${2} " ."
38+ if [ -e ${2} _build ]; then
39+ rm -r ${2} _build
40+ fi ;
41+ mkdir -p ${2} _build
42+ cd ${2} _build
43+ cmake ${4} ../${2}
4344
44- echo " Compiling and installing " ${2} " ."
45- {
46- make -j2
47- make install
48- } > /dev/null
45+ echo " Compiling and installing " ${2} " ."
46+ {
47+ make -j2
48+ make install
49+ } > /dev/null
4950
50- echo " Cleaning up."
51- cd ..
52- rm -rf ${2}
53- rm -rf ${2} _build
51+ echo " Cleaning up."
52+ cd ..
53+ rm -rf ${2}
54+ rm -rf ${2} _build
5455
55- cd ${HERE_DIR}
56- echo " Done."
57- fi ;
56+ cd ${HERE_DIR}
57+ echo " Done."
5858}
5959
6060download_and_cmake_install \
You can’t perform that action at this time.
0 commit comments