-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·34 lines (29 loc) · 1.02 KB
/
setup.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
#!/bin/bash
REQUIRED_JAVA_VERSION="17.0.0"
check_java_version() {
echo "Checking Java Version"
if ! which java &>- ;
then
echo "Java not found, please install Java first"
exit 1
else
JAVA_VERSION="$(java --version | head -n1 | cut -d' ' -f2)"
echo "Java Version: $JAVA_VERSION"
LOWEST_JAVA_VERSION="$(echo "$JAVA_VERSION\n$REQUIRED_JAVA_VERSION" | sort | head -n1)"
if [ "$LOWEST_JAVA_VERSION" != "$REQUIRED_JAVA_VERSION" ]
then
echo "Please update your java version to $REQUIRED_JAVA_VERSION or later"
exit 1
fi
fi
}
echo "Smojify Installer"
check_java_version
echo "Downloading Spotify libs"
mkdir -pv 'app/libs'
wget 'https://github.com/spotify/android-sdk/releases/download/v0.7.2-appremote_v1.2.3-auth/spotify-app-remote-release-0.7.2.aar'
mv 'spotify-app-remote-release-0.7.2.aar' 'app/libs/'
wget 'https://github.com/spotify/android-sdk/releases/download/v0.7.1-appremote_v1.2.3-auth/spotify-auth-release-1.2.3.aar'
mv 'spotify-auth-release-1.2.3.aar' 'app/libs/'
./gradlew clean build --refresh-dependencies
echo "Done"