Skip to content

Commit

Permalink
Updated function for downloading latest release of Owncloud
Browse files Browse the repository at this point in the history
  • Loading branch information
petrockblog committed Jul 27, 2014
1 parent e5dfa11 commit b7849d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions owncloudpie_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ function downloadLatestOwncloudRelease()
printMsg "Updating to latest Owncloud release."

# download and extract the latest release of Owncloud
wget -O changelog http://owncloud.org/changelog/
latestrelease=$(cat changelog | grep "Download:" | head -n 1 | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//')
wget "$latestrelease"
latestrelease="http://download.owncloud.org/community/owncloud-latest.tar.bz2"
wget "$latestrelease"
if [[ $? -gt 0 ]]; then
wget -O changelog http://owncloud.org/changelog/
latestrelease=$(cat changelog | grep "Download:" | head -n 2 | tail -n 1 | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//')
wget "$latestrelease"
rm changelog
fi
tar -xjf "$(basename $latestrelease)"
rm "$(basename $latestrelease)"
rm changelog
}

function writeServerConfig()
Expand Down

0 comments on commit b7849d2

Please sign in to comment.