Skip to content

Instantly share code, notes, and snippets.

@Larusso
Created October 8, 2018 09:07
Show Gist options
  • Save Larusso/c4f1681ea129aa86e5e7fd60e7a05b77 to your computer and use it in GitHub Desktop.
Save Larusso/c4f1681ea129aa86e5e7fd60e7a05b77 to your computer and use it in GitHub Desktop.
Install a unity editor to a specified destination
#!/usr/bin/env bash
set -x
installer=$1
destination=$2
tmpDestination="$destination/tmp"
mkdir -p $tmpDestination
xar -xf "$installer" -C "$tmpDestination"
tar -C "$destination" -zmxf "$tmpDestination/Unity.pkg.tmp/Payload"
mv $destination/Unity/* $destination
rm -fr "$destination/Unity"
rm -fr $tmpDestination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment