Skip to content

Commit

Permalink
Remove unrar installation for Linux
Browse files Browse the repository at this point in the history
Unrar seems to only play nice when certain files are in very specific
locations. Unfortunately these locations are owned by root. A fix could
be put together using sudo, but it makes more sense to install from apt
if sudo has to be used anyway. For now the README notes the unrar requirement
for Linux platforms.
  • Loading branch information
xdissent committed Sep 7, 2011
1 parent e12d35e commit 5ca0fa0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Requirements
============

* VirtualBox (http://virtualbox.org)
* Curl (Ubuntu: ``apt-get install curl``)
* Curl (Ubuntu: ``sudo apt-get install curl``)
* Linux Only: unrar (Ubuntu: ``sudo apt-get install unrar``)
* Patience


Expand Down
14 changes: 9 additions & 5 deletions ievms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ check_virtualbox() {
fi
}

download_unrar() {
install_unrar() {
case $kernel in
Darwin) url="http://www.rarlab.com/rar/rarosx-4.0.1.tar.gz" ;;
Linux) url="http://www.rarlab.com/rar/rarlinux-4.0.1.tar.gz" ;;
Darwin) download_unrar ;;
Linux) fail "Linux support requires unrar (sudo apt-get install for Ubuntu/Debian)" ;;
esac
}

download_unrar() {
url="http://www.rarlab.com/rar/rarosx-4.0.1.tar.gz"
archive="rar.tar.gz"

log "Downloading unrar from ${url} to ${ievms_home}/${archive}"
Expand All @@ -79,7 +83,7 @@ download_unrar() {

check_unrar() {
PATH="${PATH}:${ievms_home}/rar"
hash unrar 2>&- || download_unrar
hash unrar 2>&- || install_unrar
}

build_ievm() {
Expand Down Expand Up @@ -176,4 +180,4 @@ do
build_ievm $ver
done

log "Done!"
log "Done!"

0 comments on commit 5ca0fa0

Please sign in to comment.