#!/bin/bash set -e sdk_user= sdk_pass= sdk_dev=http://www.steinberg.net/nc/en/company/developers/sdk_download_portal sdk_tmp_dir=$(mktemp -q -d --tmpdir=/tmp vst-sdk-installer.XXX) sdk_cookie=$sdk_tmp_dir/steinberg-cookie user_agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0" sdk_checksum=74e41da563a1c91e86677530936cb46a15f1af76b29d4c1877134cf29eafb718 sdk_dir=/usr/include/vst cd $sdk_tmp_dir [ -f $sdk_cookie ] && rm -f $sdk_cookie || true echo echo "Storing cookie." echo "---------------" echo curl -# -c $sdk_cookie \ -A "$user_agent" \ -d user=$sdk_user \ -d pass=$sdk_pass \ -d logintype=login \ -L $sdk_dev.html > /dev/null echo echo echo "Starting download." echo "------------------" echo sdk_download_url=$(curl -s -b $sdk_cookie \ -A "$user_agent" \ -d vst_status=0 \ -d sdk_daten_speichern="Download+VST+SDK+now" \ -L $sdk_dev/vst_360_audio_plug_ins_sdk.html \ | grep vstsdk | cut -d '"' -f 2 | sed 's/\&/\&/g') sdk_zip=${sdk_download_url#*downloads/} sdk_zip=${sdk_zip%.zip*}.zip curl -# -b $sdk_cookie \ -A "$user_agent" \ -C - \ -O -J -L http://www.steinberg.net/$sdk_download_url | cat echo echo "Checking integrity of zip." echo "--------------------------" echo echo "$sdk_checksum $sdk_tmp_dir/$sdk_zip" | sha256sum -c echo echo "Extracting header files from zip." echo "---------------------------------" echo unzip -j -o $sdk_zip "*aeffect*" -d $sdk_dir echo echo "Patching header files." echo "----------------------" echo sed -i '69s/__cdecl/\/\/__cdecl/' $sdk_dir/aeffect.h echo echo "Removing temporary directory." echo "-----------------------------" echo rm -v -r -f $sdk_tmp_dir