Mercurial > hg > zsh-env
annotate setup.sh @ 178:51710c7c26c2
jdk 13 is superseeded by jdk 14, use the generic jdk 11 link
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Tue, 21 Jul 2020 09:15:13 +0200 |
parents | f8c9b13158b8 |
children | f6df36a328b5 |
rev | line source |
---|---|
170
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
1 #!/bin/bash |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
2 # |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
3 # setup the shell env on a new, naked host |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
4 # |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
5 cd $HOME |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
6 |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
7 replace_with_link() { |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
8 local target="$1" |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
9 local source="$2" |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
10 |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
11 if [[ -f $target ]]; then |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
12 rm $target |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
13 fi |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
14 ln -s $source $target |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
15 } |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
16 |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
17 replace_with_link .zshrc .zsh-env/zshrc |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
18 replace_with_link .hgrc .zsh-env/hgrc |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
19 replace_with_link .nanorc .zsh-env/.nanorc |
95e349996727
Add a script for setting up the shell environment on a naked home.
Dirk Olmes <dirk.olmes@codedo.de>
parents:
diff
changeset
|
20 replace_with_link .screenrc .zsh-env/.screenrc |
172
efce15db2915
create a default .hgignore file
Dirk Olmes <dirk.olmes@codedo.de>
parents:
170
diff
changeset
|
21 |
173
f8c9b13158b8
create a default zshrc for the host
Dirk Olmes <dirk.olmes@codedo.de>
parents:
172
diff
changeset
|
22 touch .zsh-env/zshrc-$HOST |
f8c9b13158b8
create a default zshrc for the host
Dirk Olmes <dirk.olmes@codedo.de>
parents:
172
diff
changeset
|
23 |
172
efce15db2915
create a default .hgignore file
Dirk Olmes <dirk.olmes@codedo.de>
parents:
170
diff
changeset
|
24 cat << EOF > .zsh-env/.hgignore |
efce15db2915
create a default .hgignore file
Dirk Olmes <dirk.olmes@codedo.de>
parents:
170
diff
changeset
|
25 syntax: glob |
efce15db2915
create a default .hgignore file
Dirk Olmes <dirk.olmes@codedo.de>
parents:
170
diff
changeset
|
26 .hgignore |
efce15db2915
create a default .hgignore file
Dirk Olmes <dirk.olmes@codedo.de>
parents:
170
diff
changeset
|
27 zshrc-$HOST |
efce15db2915
create a default .hgignore file
Dirk Olmes <dirk.olmes@codedo.de>
parents:
170
diff
changeset
|
28 EOF |