ModeratorElection/image/resources/install.sh

52 lines
1.6 KiB
Bash
Raw Normal View History

#!/bin/bash
set -exo pipefail
function main()
{
upgradeSystem
apt-get -qqy install openjdk-17-jdk-headless git curl unzip
mkdir /usr/local/src/ModeratorElection
git clone --single-branch --branch main https://repo.prod.meissa.de/meissa/ModeratorElection.git /usr/local/src/ModeratorElection
cp /tmp/MEMBERNAMES /usr/local/src/ModeratorElection
#download gradle
#gradle_version="8.4"
#curl -SsLo /tmp/gradle-${gradle_version}-bin.zip https://services.gradle.org/distributions/gradle-${gradle_version}-bin.zip
#curl -SsLo /tmp/gradle-${gradle_version}-bin.zip.sha256 https://services.gradle.org/distributions/gradle-${gradle_version}-bin.zip.sha256
#checksum gradle
#checksum
#install gradle
#mkdir /opt/gradle
#unzip -qqd /opt/gradle /tmp/gradle-${gradle_version}-bin.zip
#export PATH=$PATH:/opt/gradle/gradle-${gradle_version}/bin
#ToDo install graalvm, put graalvm binary here
#install -m 0700 /tmp/entrypoint-start-and-wait.sh /
#install -m 0700 /tmp/init.sh /usr/local/bin/
#install -m 0700 /tmp/backup.sh /usr/local/bin/
#install -m 0700 /tmp/restore.sh /usr/local/bin/
#install -m 0700 /tmp/restic-snapshots.sh /usr/local/bin/
#cleanupDocker
} #> /dev/null
function checksum() {
#gradle
echo " /tmp/gradle-${gradle_version}-bin.zip"|tee -a /tmp/gradle-${gradle_version}-bin.zip.sha256
sha256sum -c --status /tmp/gradle-${gradle_version}-bin.zip.sha256
}
source /tmp/install_functions_debian.sh
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
cd /usr/local/src/ModeratorElection
#npm install -g npm@latest
#npm audit fix
#npm ci --omit=dev
#./gradlew build