#!/bin/bash # Installs the latest PlumppuVox VST3 on an Apple Silicon Mac. # # curl -fsSL https:///plumppuvox.sh | bash # # Downloads the newest build from the "main-build" GitHub release and puts # PlumppuVox.vst3 in ~/Library/Audio/Plug-Ins/VST3 (no admin rights needed). # Rescan plugins in your host afterwards. Run it again to update. # # Environment overrides: # PLUMPPUVOX_URL download a different zip # PLUMPPUVOX_DEST install into a different folder # Everything lives in main(), called on the last line, so a download cut short # while piping into bash runs nothing at all. main() { set -euo pipefail local repo="inthevidual/plumppuvox" local url="${PLUMPPUVOX_URL:-https://github.com/$repo/releases/download/main-build/PlumppuVox-macOS-AppleSilicon.zip}" local dest="${PLUMPPUVOX_DEST:-$HOME/Library/Audio/Plug-Ins/VST3}" local bundle="PlumppuVox.vst3" say() { printf '\033[1m==>\033[0m %s\n' "$*"; } die() { printf '\033[1;31mError:\033[0m %s\n' "$*" >&2; exit 1; } [ "$(uname -s)" = Darwin ] || die "this installer is for macOS." # Under Rosetta, uname reports x86_64 even on Apple Silicon; ask the kernel. if [ "$(uname -m)" != arm64 ] && [ "$(sysctl -in hw.optional.arm64 2>/dev/null)" != 1 ]; then die "PlumppuVox is built for Apple Silicon (M-series) Macs only." fi # Global, not local: the EXIT trap runs after main has returned. tmp="$(mktemp -d -t plumppuvox)" trap 'rm -rf "$tmp"' EXIT say "Downloading PlumppuVox" curl -fL --progress-bar --retry 3 -o "$tmp/plumppuvox.zip" "$url" \ || die "download failed: $url" say "Unpacking" ditto -x -k "$tmp/plumppuvox.zip" "$tmp/unpacked" || die "the download is not a valid zip." [ -f "$tmp/unpacked/$bundle/Contents/MacOS/PlumppuVox" ] \ || die "the download does not contain $bundle." # Quarantine would make macOS refuse to load the unnotarized plugin. xattr -dr com.apple.quarantine "$tmp/unpacked/$bundle" 2>/dev/null || true codesign --verify --deep "$tmp/unpacked/$bundle" 2>/dev/null \ || die "the plugin's signature does not verify; not installing it." say "Installing into $dest" mkdir -p "$dest" rm -rf "${dest:?}/$bundle" ditto "$tmp/unpacked/$bundle" "$dest/$bundle" say "PlumppuVox is installed. Rescan plugins (or restart) in your host to pick it up." } main "$@"