aboutsummaryrefslogtreecommitdiff
path: root/share/hoarder/signal-cli/unix/linux/debian/install
blob: 48c5d7686892f6218b0f7c0fdf22973c64bff24b (plain)
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
#!/usr/bin/env sh
#
# Install signal-cli
#

# Parameters
SHARE="$1"
LIB="$2"

# Include basic functions
. $LIB/trashman/functions || exit 1
. $LIB/trashman/debian    || exit 1

# Requirements
trashman_apt_install_packages gradle

# Go to working folder
mkdir -p $HOME/.local/share
cd $HOME/.local/share

# Get the code
if [ -d "signal-cli" ]; then
  cd signal-cli && git pull || exit 1
else
  git clone https://github.com/AsamK/signal-cli && cd signal-cli || exit 1
fi

# Build
./gradlew build
./gradlew installDist

# Create symlink to scripts
mkdir -p $HOME/.local/bin
cd $HOME/.local/bin
ln -sf $HOME/.local/share/signal-cli/build/install/signal-cli/bin/signal-cli
#echo "cd $HOME/.local/share/signal-cli/build/install/signal-cli/bin/signal-cli && ./signal-cli" > signal-cli
chmod +x signal-cli