-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigureUnixShell
More file actions
38 lines (34 loc) · 816 Bytes
/
Copy pathconfigureUnixShell
File metadata and controls
38 lines (34 loc) · 816 Bytes
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
#!/bin/bash
mv .virc ~
ln ~/.virc ~/.vimrc # Depending on what is installed, both vi config file name could be used...
mv .screenrc ~
mv .inputrc ~
if [ "$(grep Geri ~/.bashrc)" == "# Updated by Geri" ]; then
echo "The file .bashrc is already updated, nothing to do...."
else
cat aliases >> ~/.bashrc
fi
mv .vim ~
if [ -e ~/.ssh ]; then
cat .ssh/id_rsa.pub >> ~/.ssh/authorized_keys
else
mv .ssh ~
mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
chmod 700 ~/.ssh
fi
chmod 600 ~/.ssh/authorized_keys
if [ ! -e ~/bin ]; then
mkdir ~/bin
fi
cp delhost ~/bin/delhost
chmod 700 ~/bin/delhost
if [ "$1" == "-d" ]; then
cd
rm -rf UnixSettingsFiles
if [ $? -eq 0 ]; then
echo "Cleanup is successfull."
else
echo "Something went wrong with the cleanup!"
fi
fi
# End of script. This line is only for testing