fix new filename on github and error on failed download

This commit is contained in:
olli 2024-02-06 12:23:32 +01:00
parent e01c011465
commit d45197ca81

View File

@ -65,15 +65,14 @@
then
echo "signal-cli-${SIGNALCLIVERS} already installed - no Update available"
else
[ -f signal-cli-${SIGNALCLIVERS}-Linux.tar.gz ] || wget -q "https://github.com/AsamK/signal-cli/releases/download/v${SIGNALCLIVERS}/signal-cli-${SIGNALCLIVERS}-Linux.tar.gz"
tar --no-same-permissions -xzf signal-cli-${SIGNALCLIVERS}-Linux.tar.gz
[ -f signal-cli-${SIGNALCLIVERS}.tar.gz ] || wget -q "https://github.com/AsamK/signal-cli/releases/download/v${SIGNALCLIVERS}/signal-cli-${SIGNALCLIVERS}.tar.gz"
[ -f signal-cli-${SIGNALCLIVERS}.tar.gz ] || g_echo_error "Could not download https://github.com/AsamK/signal-cli/releases/download/v${SIGNALCLIVERS}/signal-cli-${SIGNALCLIVERS}.tar.gz"
tar --no-same-permissions -xzf signal-cli-${SIGNALCLIVERS}.tar.gz || g_echo_error "Could not extract signal-cli-${SIGNALCLIVERS}.tar.gz"
if [ $(uname -m) == aarch64 ]
then
SIGNALLIBVERS=$(ls signal-cli-${SIGNALCLIVERS}/lib/libsignal-client-*.jar | cut -d'-' -f5 | sed 's/.jar$//')
curl -Lo libsignal_jni.so "https://gitlab.com/packaging/libsignal-client/-/jobs/artifacts/v${SIGNALLIBVERS}/raw/libsignal-client/arm64/libsignal_jni.so?job=libsignal-client-arm64" || g_echo_error "Failed to doenload libsignal_jni.so"
cp -p libsignal_jni.so libsignal_jni.so-${SIGNALLIBVERS}
#rm -f libsignal_jni.so
#tar --no-same-permissions -xzf libsignal_jni.so-v${SIGNALLIBVERS}-aarch64-unknown-linux-gnu.tar.gz
zip -uj signal-cli-${SIGNALCLIVERS}/lib/libsignal-client-${SIGNALLIBVERS}.jar libsignal_jni.so
fi
chown -R signal. signal-cli-${SIGNALCLIVERS}