Updated the download method depending on the ext

This commit is contained in:
Yann Esposito (Yogsototh) 2012-04-13 14:23:50 +02:00
parent 3be83f7ccf
commit 822c6ca4e8

View file

@ -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() {