Updated the download method depending on the ext
This commit is contained in:
parent
3be83f7ccf
commit
822c6ca4e8
1 changed files with 8 additions and 1 deletions
|
@ -22,7 +22,14 @@ function clearEnvironment() {
|
|||
}
|
||||
|
||||
function downloadAndExtract() {
|
||||
mkdir -p $1 && curl $2 -o - | tar xzf - -C $1
|
||||
case $2 in
|
||||
*.tar) options=xf ;;
|
||||
*.tar.gz) options=xzf ;;
|
||||
*.tar.bz2) options=xjf;;
|
||||
*) error "Unknow format for $2; should be tar, tar.gz or tar.bz2" ;;
|
||||
esac
|
||||
|
||||
mkdir -p $1 && curl $2 -o - | tar $options - -C $1
|
||||
}
|
||||
|
||||
function configureMakeInstall() {
|
||||
|
|
Loading…
Reference in a new issue