Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
Last active January 1, 2018 11:42
Show Gist options
  • Save mattintosh4/d5116168d0743d437ea1150cf11588d7 to your computer and use it in GitHub Desktop.
Save mattintosh4/d5116168d0743d437ea1150cf11588d7 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -u
set -x
QAAC_VERSION=2.64
QAAC_SHA1=35081d830d17fc9925f102095ac8bbc4d08f4e0b
: ${1:?} # iTunes64Setup.exe
test -f "${1}"
which curl
which sha1sum
which 7z
curl -L -o qaac_${QAAC_VERSION}.zip "https://sites.google.com/site/qaacpage/cabinet/qaac_${QAAC_VERSION}.zip?attredirects=0&d=1"
sha1sum --check <<!
${QAAC_SHA1} *qaac_${QAAC_VERSION}.zip
!
7z e -y -oqaac_${QAAC_VERSION} qaac_${QAAC_VERSION}.zip "qaac_${QAAC_VERSION}/x64/*.*"
7z e -y "${1}" AppleApplicationSupport64.msi
7z e -y -oqaac_${QAAC_VERSION} AppleApplicationSupport64.msi '*'.dll
rm AppleApplicationSupport64.msi
cd qaac_${QAAC_VERSION}
set -- x64_AppleApplicationSupport_*
for f
do
test -f ${f} || continue
mv ${f} ${f#x64_AppleApplicationSupport_}
done
#!/bin/bash
set -e
set -u
set -x
: ${1:?} # iTunes64Setup.exe
test -f "${1}"
iTunes64Setup_exe=${1}
which curl
which sha1sum
which 7z
which jq
set -- `curl https://api.github.com/repos/nu774/qaac/releases/latest | jq -r ".assets[].name, .assets[].browser_download_url"`
qaac_version=${1%.*}
qaac_zipfile=${1}
qaac_browser_download_url=${2}
curl -L -o${qaac_zipfile} "${qaac_browser_download_url}"
7z e -y -o${qaac_version} ${qaac_zipfile} "${qaac_version}/x64/*.*"
7z e -y "${iTunes64Setup_exe}" AppleApplicationSupport64.msi
7z e -y -o${qaac_version} AppleApplicationSupport64.msi '*'.dll
rm AppleApplicationSupport64.msi
cd ${qaac_version}
set -- x64_AppleApplicationSupport_*
for f
do
test -f ${f} || continue
mv ${f} ${f#x64_AppleApplicationSupport_}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment