-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete rewrite of the JOSM installation script with focus on stable…
… JOSM, dependency resolving, easyness and unambiguity
- Loading branch information
1 parent
ea2ba36
commit ef9316a
Showing
1 changed file
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,43 @@ | ||
#!/bin/sh | ||
wget -q -O "-" https://josm.openstreetmap.de/josm-apt.key | apt-key add - | ||
echo "deb https://josm.openstreetmap.de/apt alldist universe" > /etc/apt/sources.list.d/josm.list | ||
apt update | ||
apt install josm josm-latest | ||
# now you should be able to start josm (=josm-tested) or josm-latest | ||
#!/bin/bash | ||
# Inataller script for the stable version of JOSM and all its dependencies aimed on easyness and unambiguity | ||
use_flatpak() { | ||
echo -e "\033[0;33mInstalling JOSM via Flatpak ...\033[0;m" | ||
flatpak install app/org.openstreetmap.josm/x86_64/stable -y | ||
} | ||
|
||
use_apt() { | ||
echo -e "\033[0;33mInstalling JOSM via APT...\033[0;m" | ||
if [ -z $(which java) ]; | ||
then | ||
echo -e "\033[0;31mJava not installed!\033[0;m" | ||
echo -e "\033[0;33mInstalling recommended version JRE (Java Runtime Environment) 8.0 ...\033[0;m" | ||
apt install openjdk-8-jre -y | ||
fi | ||
|
||
echo -e "\033[0;33mAdding security key of official JOSM repository to your system ...\033[0;m" | ||
if ! [ -z $(which wget) ]; | ||
then | ||
wget -q -O "-" https://josm.openstreetmap.de/josm-apt.key | apt-key add - | ||
elif ! [ -z $(which curl) ]; | ||
then | ||
curl https://josm.openstreetmap.de/josm-apt.key | apt-key add | ||
fi | ||
|
||
echo -e "\033[0;33mAdding official JOSM repository to your system ...\033[0;m" | ||
echo "deb https://josm.openstreetmap.de/apt alldist universe" > /etc/apt/sources.list.d/josm.list | ||
|
||
echo -e "\033[0;33mUpdating software list ...\033[0;m" | ||
apt update | ||
|
||
echo -e "\033[0;33mInstalling JOSM on your system ...\033[0;m" | ||
|
||
# install josm-tested | ||
apt install josm -y | ||
} | ||
|
||
if ! [ -z $(which flatpak) ]; | ||
then | ||
use_flatpak # flatpak is installed, use it | ||
else | ||
use_apt | ||
fi; |