forked from qmasingarbe/pymiere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
extension_installer_mac.sh
36 lines (30 loc) · 1010 Bytes
/
extension_installer_mac.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
# Auto install PymiereLink extension to Premiere on mac
# Get temp path
tempdir=$(mktemp -d)
# Download zxp (extension) file
echo "Download .zxp file"
url="https://raw.githubusercontent.com/qmasingarbe/pymiere/master/pymiere_link.zxp"
fname_zxp=$(basename "$url")
path_zxp="$tempdir/$fname_zxp"
curl "$url" --output "$path_zxp"
# Download ExManCmd (extension manager)
echo "Download ExManCmd"
url="https://download.macromedia.com/pub/extensionmanager/ExManCmd_mac.dmg"
fname_exman=$(basename "$url")
path_exman="$tempdir/$fname_exman"
curl "$url" --output "$path_exman"
# Mount ExManCmd DMG
mount_path="$tempdir/ExManCmdMount"
echo "Mount ExManCmd DMG: $path_exman to $mount_path"
hdiutil attach "$path_exman" -mountpoint $mount_path
# Install the .zxp file
exmancmd="$mount_path/Contents/MacOS/ExManCmd"
echo "Install zxp"
"$exmancmd" --install "$path_zxp"
# For debugging
# "$exmancmd" --list all
# Clean up
echo "Unmount ExManCmd DMG"
hdiutil detach "$mount_path"
rm -rf "$tempdir"