Add generic file for path and alias definition.

This commit is contained in:
Mikaël Capelle 2017-03-16 10:52:10 +01:00
parent d3aa246bcc
commit 8872837785
4 changed files with 43 additions and 7 deletions

8
.zshrc
View File

@ -1,5 +1,6 @@
# If you come from bash you might have to change your $PATH. SHELL=/bin/zsh
# export PATH=$HOME/bin:/usr/local/bin:$PATH export TERM="xterm-256color"
export LC_ALL="en_US.utf8"
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH=/home/mcapelle/.oh-my-zsh export ZSH=/home/mcapelle/.oh-my-zsh
@ -83,3 +84,6 @@ source $ZSH/oh-my-zsh.sh
# Example aliases # Example aliases
# alias zshconfig="mate ~/.zshrc" # alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh" # alias ohmyzsh="mate ~/.oh-my-zsh"
source $HOME/.config/path.sh
source $HOME/.config/alias.sh

6
alias.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
alias rm='rm -i --preserve-root'

20
path.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
GUROBI_PATH=$(ls -d $HOME/.softwares/gurobi*/linux64)
if [ -e "$GUROBI_PATH" ]; then
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GUROBI_PATH}/lib
PATH=${PATH}:${GUROBI_PATH}/bin
PYTHONPATH=${PYTHONPATH}:${GUROBI_PATH}/lib/python3.4_utf32
export GRB_LICENSE_FILE=${GUROBI_PATH}/gurobi.lic
fi
MYSOFT_PATH=$HOME/.softwares
if [ -e "$MYSOFT_PATH" ]; then
PATH=${PATH}:${MYSOFT_PATH}/bin
fi
export PATH
export LD_LIBRARY_PATH
export PYTHONPATH

View File

@ -1,7 +1,13 @@
#!/bin/bash #!/bin/sh
ln -f -s `pwd`/.emacs.el ~/ # Emacs configuration
ln -f -s `pwd`/.emacs.d ~/ ln -f -s $(pwd)/.emacs.d $HOME/
ln -f -s `pwd`/.bashrc ~/
ln -f -s `pwd`/fish ~/.config # Shell configurations
ln -f -s $(pwd)/.bashrc $HOME/
ln -f -s $(pwd)/.zshrc $HOME/
ln -f -s $(pwd)/.oh-my-zsh $HOME/
ln -f -s $(pwd)/fish $HOME/.config
ln -f -s $(pwd)/alias.sh $HOME/.config
ln -f -s $(pwd)/path.sh $HOME/.config