aboutsummaryrefslogtreecommitdiff
path: root/share/hoarder/signal-cli/unix/linux
diff options
context:
space:
mode:
Diffstat (limited to 'share/hoarder/signal-cli/unix/linux')
-rwxr-xr-xshare/hoarder/signal-cli/unix/linux/debian/install37
1 files changed, 37 insertions, 0 deletions
diff --git a/share/hoarder/signal-cli/unix/linux/debian/install b/share/hoarder/signal-cli/unix/linux/debian/install
new file mode 100755
index 0000000..48c5d76
--- /dev/null
+++ b/share/hoarder/signal-cli/unix/linux/debian/install
@@ -0,0 +1,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