-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (29 loc) · 861 Bytes
/
install.sh
File metadata and controls
executable file
·40 lines (29 loc) · 861 Bytes
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
#!/bin/sh
set -e
if [ $# -lt 1 ]; then
echo "Usage: $0 <version> [architecture]"
exit 1
fi
# Prepend "v" to version, if needed
version="$1"
if [ "${version#v}" = "$version" ]; then
version="v$version"
fi
# without "v"
version_number="${version#v}"
# Default architecture is amd64 if not provided
if [ -z "$2" ]; then
architecture="amd64"
else
architecture="$2"
fi
echo $version
echo $version_number
echo $architecture
wget https://github.com/ombra-chat/tdlib-java/releases/download/$version/libtdjni-$version-$architecture.zip
wget https://github.com/ombra-chat/tdlib-java/releases/download/$version/tdlib-$version.jar
mvn install:install-file -Dfile=tdlib-$version.jar -DgroupId=org.drinkless -DartifactId=tdlib -Dversion=$version_number -Dpackaging=jar
unzip libtdjni-*.zip
sudo mv libtdjni.so /usr/lib64
rm libtdjni-*.zip
rm tdlib-*.jar