summaryrefslogtreecommitdiffstats
path: root/templates/developers/rdt/loginrun.sh
diff options
context:
space:
mode:
Diffstat (limited to 'templates/developers/rdt/loginrun.sh')
-rwxr-xr-xtemplates/developers/rdt/loginrun.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/templates/developers/rdt/loginrun.sh b/templates/developers/rdt/loginrun.sh
new file mode 100755
index 0000000..9811e3a
--- /dev/null
+++ b/templates/developers/rdt/loginrun.sh
@@ -0,0 +1,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