Re: wine-staging-updater-osx

From NAT, 6 Years ago, written in Bash, viewed 695 times. This paste is a reply to wine-staging-updater-osx from NAT - view diff
URL https://code.nat.moe/view/ce7d46cf Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. alias download="./padown"
  4. _seed='https://repos.wine-staging.com/macosx/i686/'
  5.  
  6. _url_latest="$_seed$(curl $_seed 2> /dev/null | \
  7.                      grep 'pkg<' | \
  8.                      tail -n1 | \
  9.                      awk -F\" '{print $2}')"
  10.  
  11. _ver_latest=$(echo $_url_latest | \
  12.               awk -F"wine-staging-" '{print $2}' | \
  13.               awk -F"-osx" '{print $1}')
  14.  
  15. _ver_current=$(wine --version | \
  16.                awk -F"wine-" '{print $2}' | \
  17.                awk -F" " '{print $1}')
  18.  
  19. echo "Latest version:  $_ver_latest"
  20. echo "Current version: $_ver_current"
  21.  
  22. [[ ! $_ver_latest == $_ver_current ]] && {
  23.         download $_url_latest
  24.         open wine-staging-$_ver_latest-osx.pkg
  25. } || \
  26.         echo "already latest."

Reply to "Re: wine-staging-updater-osx"

Here you can reply to the paste above

captcha