[Pro] wget doesn't work downloading new pro version


#1

Hello,
every update I struggle with downloading the new version using ubuntu. I copy the download link to the .tar.gz file, but wget won’t download the link; it will download a some-kb sized “index.html?p=%2Fpro%2Fseafilepro-server_6.0.2_x86-64.tar.gz” file instead

So I always have to download the file on my Desktop PC, upload it to the server and continue updating there.

A (always working) valid link *-latest.tar.gz which will work with wget would be nice.


#2

Can confirm this on debian8


#3

You need to

a. Use the download link with “&dl=1” at the end and
b. use the parameter “–trust-server-names” (or “–content-disposition”) with wget

HTH!


#4

A quick and dirty bash script to download the latest seafile pro version:

#!/bin/bash

ID=xxx
SERVER="https://download.seafile.com"
SERVERPATH="/d/$ID/?p=/pro"

LINK=`wget -q -O- $SERVER$SERVERPATH | grep dl= | grep seafile-pro-server | grep -v txt | sed -e 's/.*href="//' -e 's/".*//' | sort -t. -k 1.48,1n -k 2,2n -k 3,3n | tail -1`

wget -c --trust-server-names $SERVER$LINK

#5

Thats awesomely great. Thank you, thank you, merci, danke!


#6

The new 7.0 server needs javascript so this script does not work anymore. So here is a quick and even dirtier bash script :wink: to download the latest seafile pro version:

#!/bin/bash                                                                                                                                                                  

CHANGELOG=https://manual.seafile.com/changelog/changelog-for-seafile-professional-server.html
VERSION=`wget -q -O- $CHANGELOG | grep "h3 id" | head -1 | cut -d\> -f2 | cut -d\  -f1`

ID=XXX
SERVER="https://download.seafile.com"
#URL="$SERVER/d/$ID/files/?p=%2Fpro%2Fseafile-pro-server_${VERSION}_x86-64.tar.gz&dl=1"
URL="$SERVER/d/$ID/files/?p=%2Fpro%2Fseafile-pro-server_${VERSION}_x86-64_Ubuntu.tar.gz&dl=1"

wget -c --trust-server-names $URL