profile: normalize HOME to use slashes

This commit normalizes the HOME to match the expectation of
Unix programs. All backslashes are converted to slashes. At
least ssh is know to fail to locate its configuration files
if HOME contains backslashes.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
This commit is contained in:
Steffen Prohaska 2007-10-08 13:53:36 +02:00
Родитель e5842e8b0e
Коммит 7b0bfd3fdd
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -32,12 +32,15 @@ if [ -z "$HOME" ]; then
HOME="$USERPROFILE"
fi
export PATH="$HOME/bin:$PATH"
if [ ! -d "$HOME" ]; then
mkdir -p "$HOME"
fi
# normalize HOME to unix path
HOME="$(cd "$HOME" ; pwd)"
export PATH="$HOME/bin:$PATH"
export GNUPGHOME=~/.gnupg
if [ "x$HISTFILE" == "x/.bash_history" ]; then