wget friendly links

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
Yeah, the links change every release. I wish they would remain static, It would save me a ton of effort everytime there is an update.
 
Well it's easy enough to get the URL for the packs with curl, was just wondering for the sake of simplicity. If you're running linux then you can make a quick bash script to do the updating with something along the lines of:

Code:
#!/bin/bash
 
SERVICE='ftbserver.jar'
MCPATH='/home/minecraft/servers/DW20'
# case sensitive check the current file for naming convention (hopefully the FTB team don't change it)
PACK=Direwolf20
 
# Remove old serverfiles
rm -rf $MCPATH/mods
rm -rf $MCPATH/coremods
rm $MCPATH/$SERVICE
 
# Get new server files
URL=`curl http://www.feed-the-beast.com/download.php 2>&1 | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $PACK`
wget -O server.zip $URL
unzip server.zip -d $MCPATH
rm server.zip

I accept no responsibility for any loss of data/computers exploding from the use of this.

I might release my (simple) all in one init/console management script once I finish tweaking it if anyone is interested.