summaryrefslogtreecommitdiffstats
path: root/templates/developers/rdt/loginrun.sh
blob: 9811e3abf738bdb9faf32e6c0b282bb24a2cd315 (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
#!/bin/sh
#   this is a script that gets run from the ~/.bash_profile
#	Note: this is being run from the $BROOT directory,
#		which, by default is /build_tools

# First : only do this once, so check if it has been done:
if [ ! -f ~/.run ]; then
# Set the title bar:
cat >> ~/.bashrc << EOF
# Set the title bar:
echo -e "\e]0; CHROOT : LinHES-dev/build_root \007"
# End
EOF
#
# Set up a new ~/.bash_profile:
mv ~/.bash_profile ~/.bash_profile.orig
cat > ~/.bash_profile << EOF
#!/bin/bash
#  ~/.bash_profile
. ~/.bashrc
cdb
[ -f ~/loginrun.sh ] && ~/loginrun.sh
# prompt:
PS1='[\u@\h] \e[34m\W \e[31m\\$\e[0m '
# End
EOF
#
cat >> /etc/bashrc << EOF
# added by rdt
alias ls='ls --color=auto'
alias lt='ls -lrt'
# End
EOF
#
# end of "do only once" code
date > ~/.run && chmod 0 ~/.run
fi # End of first time test.

# End