Skip to content

Commit

Permalink
source /etc/pgvmrc then $HOME/.pgvmrc if them exists. refs guedes#14,g…
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomello committed Aug 6, 2012
1 parent c6023f8 commit 150358e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
5 changes: 1 addition & 4 deletions bin/pgvm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@

source $pgvm_home/include/helpers

if [ -f ~/.pgvmrc ]
then
source ~/.pgvmrc
fi
load_conf

action=$1

Expand Down
15 changes: 15 additions & 0 deletions include/helpers
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,18 @@ create_osx_md5()

[[ ${md5hash[0]} == ${md5hash[2]} ]] && echo ${md5hash[1]}: "SUCCESS" || exit 1
}

load_conf()
{
files="/etc/pgvmrc $HOME/.pgvmrc"

for file in $files
do
if [ -f $file ]
then
source $file
export PGVMRC=$file
break
fi
done
}

0 comments on commit 150358e

Please sign in to comment.