Mercurial > repos > other > linux
annotate setup.sh @ 51:6b1492d34562
Switch from xterm to screen to fix Nano scrolling
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 22 Mar 2017 20:38:37 +0000 |
parents | deb089e237ac |
children | 39bdd245431b |
rev | line source |
---|---|
2 | 1 #! /bin/bash |
2 | |
3 SCRIPTPATH=`dirname $(readlink -f $0)` | |
4 create_symlink() { | |
3
2a6d32a03c0e
Work around differing paths for hgview
IBBoard <dev@ibboard.co.uk>
parents:
2
diff
changeset
|
5 SOURCEFILE=$1 |
2a6d32a03c0e
Work around differing paths for hgview
IBBoard <dev@ibboard.co.uk>
parents:
2
diff
changeset
|
6 if [ "${SOURCEFILE:0:1}" != "/" ]; then |
5 | 7 SOURCEFILE=$SCRIPTPATH/$1 |
3
2a6d32a03c0e
Work around differing paths for hgview
IBBoard <dev@ibboard.co.uk>
parents:
2
diff
changeset
|
8 fi |
2 | 9 if [ ! -e $2 ]; then |
3
2a6d32a03c0e
Work around differing paths for hgview
IBBoard <dev@ibboard.co.uk>
parents:
2
diff
changeset
|
10 ln -s $SOURCEFILE $2 |
2 | 11 elif [ "$(readlink $2)" != "$SCRIPTPATH/$1" ]; then |
12 echo "Unable to link $1 config - $2 already existed" >&2 | |
13 fi | |
14 #Else it already existed but was correct | |
15 } | |
16 | |
4 | 17 add_content() { |
18 if [ -e $2 ]; then | |
19 grep -F -q "$1" $2 2>&1 | |
20 else | |
21 false | |
22 fi | |
23 if [ $? -ne 0 ]; then | |
24 echo "$1" >> $2 | |
25 fi | |
26 } | |
27 | |
2 | 28 create_symlink tmux.conf ~/.tmux.conf |
29 create_symlink hgrc ~/.hgrc | |
3
2a6d32a03c0e
Work around differing paths for hgview
IBBoard <dev@ibboard.co.uk>
parents:
2
diff
changeset
|
30 create_symlink bashrc ~/.bashrc |
24
acbc487533ab
Consistently fix Thunderbird time settings by moving some bits to profile, not bashrc
IBBoard <dev@ibboard.co.uk>
parents:
18
diff
changeset
|
31 create_symlink profile ~/.profile |
4 | 32 create_symlink /usr/lib/python*/site-packages/hgext/hgview.py ~/.hgview.py |
33 create_symlink gitconfig ~/.gitconfig | |
11
281a9cb03796
Add custom colouring for "ls" output
IBBoard <dev@ibboard.co.uk>
parents:
5
diff
changeset
|
34 create_symlink dircolors ~/.dir_colors |
18
1ec9a1720c5c
Add XCompose (custom compose key combinations for odd characters) and Nano config
IBBoard <dev@ibboard.co.uk>
parents:
11
diff
changeset
|
35 create_symlink nanorc ~/.nanorc |
1ec9a1720c5c
Add XCompose (custom compose key combinations for odd characters) and Nano config
IBBoard <dev@ibboard.co.uk>
parents:
11
diff
changeset
|
36 create_symlink XCompose ~/.XCompose |
25
59f5444ef031
Don't assume that ~/.ssh already exists
IBBoard <dev@ibboard.co.uk>
parents:
18
diff
changeset
|
37 mkdir -p ~/.ssh |
18
1ec9a1720c5c
Add XCompose (custom compose key combinations for odd characters) and Nano config
IBBoard <dev@ibboard.co.uk>
parents:
11
diff
changeset
|
38 add_content "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2c3IUHY02FAJotQKs3x+uGZ+5XpuKbWUENevjTOF1bAGwGqKNSSg5SlsL5C9aHcu6O/eBKWJNpvUa0vcXXP18ddoILq1DvZfQHDylrweGbaRviSCpRZvSKiNREQd+yAQPwGnsfkpQe5RxXjRTsk7B0VKP2LFL5seDuQfQxtGc6AgjF0TMpBoKD3UkUlfqRX7Q0tQwfTgXTNxYyQOgG61bWeUsz0XSZelF1MHsXxLwUUFuZAigwiv9YUlBSAAEwWySyN8RdsJadunKYHbxr9cJfj4T5soKVeDi2n94AScFuokAyDf3MFvJ1PYZ0p4rFzNF2zrOK3rqvA3aGg4Bi+wx ssh@ibboard.co.uk" ~/.ssh/authorized_keys |