summaryrefslogtreecommitdiffstats
path: root/linux/bin/erzeuge_installation/installiere_neo.2
blob: d6b858d64504ea033fbfbfcd8de8b5899eccf305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash

profile_neo() {
cat <<PROFIL

# NEO:
PATH=\$PATH:$inst_dir/	# für asdf und uiae
export PATH		# für asdf und uiae
asdf			# mit einem # am Zeilenanfang bleibt QWERTZ das Standardlayout, sonst ist es NEO
PROFIL
}

profile_qwertz() {
cat <<PROFIL

# NEO:
PATH=\$PATH:$inst_dir/	# für asdf und uiae
export PATH		# für asdf und uiae
# asdf			# mit einem # am Zeilenanfang bleibt QWERTZ das Standardlayout, sonst ist es NEO
PROFIL
}

neo_path() {
cat <<NEO_PATH
PATH=$PATH:$inst_dir
export PATH
echo "Die Belegung wird nun auf NEO geändert…"
asdf
NEO_PATH
}

# *** main program ***
clear
echo
echo "   *** NEO – Ergonomie und Zeichenvielfalt ***"
echo
echo
echo " Ihr System wird untersucht…"
echo

# check for an existing neo configuration
if [ -f "${NEO_CONFIG}" ]; then
	. "${NEO_CONFIG}" || die "Failed to source ${NEO_CONFIG}"
elif [ -f "${HOME}"/.neorc ]; then
	. "${HOME}"/.neorc || die "Failed to source ${HOME}/.neorc"
elif [ -f /etc/neo.conf ]; then
	. /etc/neo.conf || die "Failed to source /etc/neo.conf"
else

# no configuration file found → install NEO
	install_options
	neo_path > $inst_dir/starte_neo
	echo
	echo -e "Um NEO nun jetzt zu aktivieren geben Sie bitte »${green}. $inst_dir/starte_neo${normal}« (mit Punkt und Leerzeichen!) ein."
	echo -e "Danach oder nach dem nächsten Login kann jederzeit mit ${green}asdf${normal} von QWERTZ zu NEO und mit ${green}uiae${normal} von NEO zu QWERTZ gewechselt werden."
	exit
fi


# configuration file found → delete/deinstall options
deinstall_options
exit