Skip to content

Commit

Permalink
Moving the creation of COMPOSER_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
stefantalen committed Sep 1, 2015
1 parent 1556a79 commit 1a784ba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions scripts/composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,22 @@ else
if [[ $HHVM_IS_INSTALLED -eq 0 ]]; then
sudo hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 -v Eval.Jit=false /usr/local/bin/composer self-update
else
sudo composer self-update
composer self-update
fi
fi

if [[ $GITHUB_OAUTH -ne "" ]]; then
if [[ ! $COMPOSER_IS_INSTALLED -eq 1 ]]; then
sudo composer config -g github-oauth.github.com $GITHUB_OAUTH
composer config -g github-oauth.github.com $GITHUB_OAUTH
fi
fi


# Install Global Composer Packages if any are given
if [[ ! -z $COMPOSER_PACKAGES ]]; then

echo ">>> Installing Global Composer Packages:"
echo " " ${COMPOSER_PACKAGES[@]}
if [[ $HHVM_IS_INSTALLED -eq 0 ]]; then
hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 -v Eval.Jit=false /usr/local/bin/composer global require ${COMPOSER_PACKAGES[@]}
else
sudo composer global require ${COMPOSER_PACKAGES[@]}
fi


# Add Composer's Global Bin to ~/.profile path
if [[ -f "/home/vagrant/.profile" ]]; then
if ! grep -qsc 'COMPOSER_HOME=' /home/vagrant/.profile; then
Expand All @@ -82,4 +76,10 @@ if [[ ! -z $COMPOSER_PACKAGES ]]; then
. /home/vagrant/.profile
fi
fi

if [[ $HHVM_IS_INSTALLED -eq 0 ]]; then
hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 -v Eval.Jit=false /usr/local/bin/composer global require ${COMPOSER_PACKAGES[@]}
else
composer global require ${COMPOSER_PACKAGES[@]}
fi
fi

0 comments on commit 1a784ba

Please sign in to comment.