summaryrefslogtreecommitdiffstats
path: root/templates/developers/rdt/loginrun.sh
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
commit618d4ad515a93d1e48934be5846edd71270171ec (patch)
treea22a9294af81215d4a7b1053e5fdb4d746f39d41 /templates/developers/rdt/loginrun.sh
downloadlinhes_dev-618d4ad515a93d1e48934be5846edd71270171ec.zip
initital import
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