-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First commit adding environment setup and hw directories
- Loading branch information
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
if [ -f /home/share/Modules/global/profile.modules ] | ||
then | ||
. /home/share/Modules/global/profile.modules | ||
# put your own module loads here | ||
module load lsf | ||
module load gcc/4.8.1 | ||
fi | ||
# .bash_profile | ||
|
||
# Get the aliases and functions | ||
if [ -f ~/.bashrc ]; then | ||
. ~/.bashrc | ||
fi | ||
|
||
# User specific environment and startup programs | ||
|
||
# Permissions | ||
umask 0002 | ||
|
||
PATH=$PATH:$HOME/bin | ||
# ATM added during October setup | ||
ANTSPATH=${ANTSPATH:="/home/applications/ANTs/1.9.4/bin/"} | ||
|
||
export PATH | ||
export ANTSPATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
case "$0" in | ||
-sh|sh|*/sh) modules_shell=sh ;; | ||
-ksh|ksh|*/ksh) modules_shell=ksh ;; | ||
-zsh|zsh|*/zsh) modules_shell=zsh ;; | ||
-bash|bash|*/bash) modules_shell=bash ;; | ||
esac | ||
module() { eval `/home/share/Modules/default/bin/modulecmd $modules_shell $*`; } | ||
#module() { eval `/bin/modulecmd $modules_shell $*`; } | ||
# .bashrc | ||
|
||
# Source global definitions | ||
if [ -f /etc/bashrc ]; then | ||
. /etc/bashrc | ||
fi | ||
|
||
# Project specific environments | ||
source ~/.projects | ||
|
||
# Permissions | ||
umask 0002 | ||
|
||
# User specific aliases and functions | ||
# Added by Cassian 03/29/2016 | ||
umask g+w | ||
alias ls="ls --color=auto" | ||
# Setup a fancy shell command prompt: | ||
prompt1="\[\e[0;33m\][\A]\[\e[0m\]" # Display the time in the bash prompt | ||
prompt2="\[\e[1;39m\]\u@\h:\W\$\[\e[0m\]" # Add username@host:dir$ | ||
promptinfo=`${HOME}/.nodeload` | ||
PROMPT_COMMAND='PS1="\[\e[1;37m\e[44m\]${project_name}\[\e[0;0m\]${prompt1}${promptinfo}${prompt2}"' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/bash | ||
|
||
function hcp_env() | ||
{ | ||
source /scratch/PSB6351/envs/.env/.psb6351_environment | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import os | ||
import time | ||
|
||
files = ['.bashrc', '.bash_profile', '.projects', '.env', '.nodeload'] | ||
|
||
for f in files: | ||
if os.path.exists(os.path.expanduser('~/%s'%f)): | ||
now = ''.join(time.ctime().split(' ')).replace(':','') | ||
newname = '~/%s_%s'%(f,now) | ||
cmd = 'mv ~/%s %s'%(f,newname) | ||
print cmd | ||
os.system(cmd) | ||
cmd = 'ln -s %s ~/'%os.path.abspath(f) | ||
print cmd | ||
os.system(cmd) | ||
|