Skip to content

Instantly share code, notes, and snippets.

@meoow
Created August 9, 2014 11:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meoow/a399452221210c420f42 to your computer and use it in GitHub Desktop.
Save meoow/a399452221210c420f42 to your computer and use it in GitHub Desktop.
Download XnView MP
#!/bin/bash
ver=$(curl -s -L http://www.xnview.com/en/xnviewmp/|sed -n -E '/Version/{s/.*Version ([\.0-9]+).*/\1/;s/\.//;p;q;}')
header='http://download.xnview.com/XnViewMP-'
files=(
win.exe
win-x64.exe
mac.tgz
linux.tgz
linux-x64.tgz
)
for f in "${files[@]}";do
curl "$header$f" -o ${f%.*}-${ver}.${f##*.}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment