From 11424c9a03cc70b2fdc5cbb18457c7a995c71c8f Mon Sep 17 00:00:00 2001
From: student <student@pcfeib430-142-77.vsb.cz>
Date: Fri, 30 Aug 2024 11:19:43 +0200
Subject: [PATCH] fix: 2024
---
swi-install.sh | 54 ++++++++++++++++++++++++++------------------------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/swi-install.sh b/swi-install.sh
index f688cd6..7099690 100755
--- a/swi-install.sh
+++ b/swi-install.sh
@@ -334,6 +334,7 @@ function uninstallAppacheDerby() {
function setupBase(){
LOCALHD=/media/localdata
+ LOCALHD=/media/student/DATADISK
SWI_HOME=/media/swi-home
cat <<EOF | sudo tee /etc/profile.d/01-env-var.sh > /dev/null
#create base env var
@@ -346,16 +347,29 @@ function installMaven(){
echo '============>Installing maven .....==========================================================================================================='
setupBase
sudo apt -y install maven
+ wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
+ tar -xzf apache-maven-3.9.9-bin.tar.gz
+ rm apache-maven-3.9.9-bin.tar.gz
+ sudo rm -r /usr/share/maven/bin
+ sudo rm -r /usr/share/maven/boot
+ sudo rm -r /usr/share/maven/lib
+ sudo mv apache-maven-3.9.9/bin /usr/share/maven/bin
+ sudo mv apache-maven-3.9.9/boot /usr/share/maven/boot
+ sudo mv apache-maven-3.9.9/lib /usr/share/maven/lib
+ sudo cp -R apache-maven-3.9.9/conf/* /etc/maven/
+ sudo chown -R root:root /etc/maven/
+ sudo chown -R root:root /usr/share/maven/bin
+ sudo chown -R root:root /usr/share/maven/boot
+ sudo chown -R root:root /usr/share/maven/lib
+ rm -R apache-maven-3.9.9
+
sudo mkdir -p $LOCALHD/.m2/repository
sudo chmod -R go+rwx $LOCALHD/.m2
- if ! grep "<localRepository>$LOCALHD/\.m2/repository</localRepository>" /usr/share/maven/conf/settings.xml > /dev/null; then
- sudo sed -i -e "/<!-- localRepository/i <localRepository>$LOCALHD/.m2/repository</localRepository>" /usr/share/maven/conf/settings.xml;
- fi
cat <<EOF | sudo tee /etc/profile.d/maven.sh > /dev/null
#create default user settiing for maven
-WILDFLY_DATA_DIR=\$HOME/.wildfly
-MAVEN_HOME=/usr/share/maven
-MAVEN_USER_HOME=~/.m2
+export WILDFLY_DATA_DIR=\$HOME/.wildfly
+export MAVEN_HOME=/usr/share/maven
+export MAVEN_USER_HOME=~/.m2
EOF
cat <<EOF | sudo tee /etc/cron.d/maven > /dev/null
SHELL=/bin/sh
@@ -373,21 +387,9 @@ if [ ! -f ~/.m2/settings.xml ] ; then
fi
EOF
sudo chmod +x /usr/share/maven/bin/student-setup
- wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
- tar -xzf apache-maven-3.9.9-bin.tar.gz
- rm apache-maven-3.9.9-bin.tar.gz
- sudo rm -r /usr/share/maven/bin
- sudo rm -r /usr/share/maven/boot
- sudo rm -r /usr/share/maven/lib
- sudo mv apache-maven-3.9.9/bin /usr/share/maven/bin
- sudo mv apache-maven-3.9.9/boot /usr/share/maven/boot
- sudo mv apache-maven-3.9.9/lib /usr/share/maven/lib
- sudo cp -R apache-maven-3.9.9/conf/* /etc/maven/
- sudo chown -R root:root /etc/maven/
- sudo chown -R root:root /usr/share/maven/bin
- sudo chown -R root:root /usr/share/maven/boot
- sudo chown -R root:root /usr/share/maven/lib
- rm -R apache-maven-3.9.9
+ if ! grep "<localRepository>$LOCALHD/\.m2/repository</localRepository>" /usr/share/maven/conf/settings.xml > /dev/null; then
+ sudo sed -i -e "/<!-- localRepository/i <localRepository>$LOCALHD/.m2/repository</localRepository>" /usr/share/maven/conf/settings.xml;
+ fi
echo '============>Maven installed.==========================================================================================================='
}
@@ -594,8 +596,9 @@ function installEclipseSTS(){
function installEclipseJava(){
######Install Eclipse for JAVA development package
- installEclipseInstance java https://ftp.linux.org.tr/eclipse//technology/epp/downloads/release/2024-06/R/eclipse-java-2024-06-R-linux-gtk-x86_64.tar.gz \
-"https://download.eclipse.org/releases/2024-06/,\
+
+ installEclipseInstance java https://ftp.fau.de/eclipse/technology/epp/downloads/release/2024-03/R/eclipse-java-2024-03-R-linux-gtk-x86_64.tar.gz \
+"https://download.eclipse.org/releases/2024-03/,\
https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/,\
https://download.eclipse.org/efxclipse/updates-released/3.9.0/site/,\
https://ecd-plugin.github.io/update/" \
@@ -764,15 +767,14 @@ sudo dconf update
function installAll() {
sudo apt -y install geany
+ sudo apt -y install git gitk git-gui kdiff3 krusader unrar rar 7zip
+
#sudo sed -i -e "s/line_height=0;0;/line_height=0;2;/g" /usr/share/geany/filedefs/filetypes.common
#disableAltF5
installJava
installJavaFX
-
- sudo apt -y install git gitk git-gui kdiff3 krusader unrar rar 7zip
-
installGradle
installMaven
--
GitLab