-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdependencies.sh
54 lines (47 loc) · 1.6 KB
/
dependencies.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
case $(uname -s) in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN"
esac
MAC_DOWNLOAD_URL="https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-639.universal-apple-macosx.zip"
LINUX_DOWNLOAD_URL="https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-639.x86_64-unknown-linux.zip"
WIN_DOWNLOAD_URL="https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-639.x86_64-microsoft-win32.zip"
if [ "$machine" = "UNKNOWN" ]; then
echo "Unkown OS Detected"
exit 1
fi
echo "Cloning in ${PWD}/tools"
rm -rf tools
mkdir tools
cd tools
if [ "$machine" = "Mac" ]; then
echo "Mac detected 💻";
curl -fsSL $MAC_DOWNLOAD_URL -o Bento4-SDK.zip;
echo "Extracting Zip ... 📁"
unzip -q -o Bento4-SDK.zip;
echo "Final Cleanup 🗑️"
mv Bento4-SDK-*/ ./Bento4-SDK/;
rm -rf Bento4-SDK.zip
echo "Installed Bento4 SDK in ${PWD}/Bento4-SDK";
elif [ "$machine" = "Linux" ]; then
echo "Linux detected 💻"
curl -fsSL $LINUX_DOWNLOAD_URL -o Bento4-SDK.zip;
echo "Extracting Zip ... 📁"
unzip -q -o Bento4-SDK.zip;
echo "Final Cleanup 🗑️"
mv Bento4-SDK-*/ ./Bento4-SDK/;
rm -rf Bento4-SDK.zip
echo "Installed Bento4 SDK in ${PWD}/Bento4-SDK";
else
echo "Windows detected 💻"
curl -fsSL $WIN_DOWNLOAD_URL -o Bento4-SDK.zip;
echo "Extracting Zip ... 📁"
unzip -q -o Bento4-SDK.zip;
echo "Final Cleanup 🗑️"
mv Bento4-SDK-*/ ./Bento4-SDK/;
rm -rf Bento4-SDK.zip
echo "Installed Bento4 SDK in ${PWD}/Bento4-SDK";
fi