Advertisement
pqatsi

SoulseekQT Update Script

Feb 15th, 2013
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.01 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [[ `uname -m` -eq "x86_64" ]];
  4. then
  5.     BIT="-64bit";
  6. else
  7.     BIT="";
  8. fi
  9.  
  10. SLSKPATH="/usr/local/bin/"
  11. LAST=`wget -q --user-agent="Wget/leleobhz.org automatic update script v0.1 - Version retrieve step" "http://www.soulseekqt.net/news/node/1" -O- | grep "/SoulseekQT/Linux/" | head -n1 | awk '{ print $3 }' | sed -e "s/\./-/g"`
  12.  
  13. LINK="http://www.soulseekqt.net/SoulseekQT/Linux/SoulseekQt-$LAST$BIT.tgz"
  14.  
  15. echo "Updating Soulseek to version $LAST to $SLSKPATH. Please accept sudo credential now."
  16. gksudo true
  17.  
  18. # Showtime!
  19. TMP=`mktemp`
  20.  
  21. sudo rm -f $SLSKPATH/soulseek
  22. $(wget -o $TMP --progress=bar:force --user-agent="Wget/leleobhz.org automatic update script v0.1 - File download/pipeline step" $LINK -O- | tar -xzO | sudo dd of=$SLSKPATH/soulseek ; rm -f $TMP) 2>&1>/dev/null &
  23. tail --follow=name $TMP 2>/dev/null | zenity --title="SoulseekQT update progress" --progress --auto-close --auto-kill --no-cancel
  24. sudo chown root.root $SLSKPATH/soulseek
  25. sudo chmod 0755 $SLSKPATH/soulseek
  26.  
  27. echo "Done!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement