Created
March 22, 2010 10:17
-
-
Save poppen/339948 to your computer and use it in GitHub Desktop.
.profile
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
# ~/.profile: executed by the command interpreter for login shells. | |
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login | |
# exists. | |
# see /usr/share/doc/bash/examples/startup-files for examples. | |
# the files are located in the bash-doc package. | |
# the default umask is set in /etc/profile | |
#umask 022 | |
# if running bash | |
if [ -n "$BASH_VERSION" ]; then | |
# include .bashrc if it exists | |
if [ -f "$HOME/.bashrc" ]; then | |
. "$HOME/.bashrc" | |
fi | |
fi | |
# $PAGER | |
if which lv > /dev/null 2>&1; then | |
export PAGER="lv" | |
elif which jless > /dev/null 2>&1; then | |
export PAGER="jless" | |
elif which less > /dev/null 2>&1; then | |
export PAGER="less" | |
else | |
export PAGER="more" | |
fi | |
# $LANG | |
export LANG="ja_JP.UTF-8" | |
# $EDITOR | |
export EDITOR='vi' | |
# set PATH so it includes user's private bin if it exists | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
dirs="/sbin /bin \ | |
/usr/sbin /usr/bin \ | |
/usr/local/sbin /usr/local/bin \ | |
/usr/opt/bin \ | |
/opt/bin" | |
for i in $dirs; do | |
if [ -d "$i" ]; then | |
chk_same=0 | |
IFS_SAVE=$IFS | |
IFS=: | |
for j in $PATH; do | |
if [ "$j" = "$i" ]; then | |
chk_same=1 | |
break | |
fi | |
done | |
IFS=$IFS_SAVE | |
if [ $chk_same -eq 0 ]; then | |
PATH="${i}:$PATH" | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment