Skip to content

Instantly share code, notes, and snippets.

@event15
Created June 2, 2017 20:03
Show Gist options
  • Save event15/fd16f13a75d1d7ce128e5a6a53d47e5b to your computer and use it in GitHub Desktop.
Save event15/fd16f13a75d1d7ce128e5a6a53d47e5b to your computer and use it in GitHub Desktop.
#!/bin/bash
pushd "$( dirname $0 )/.." > /dev/null
BASEPATH=$( pwd -P )
COMPOSER=$( which composer || which composer.phar || echo "$BASEPATH/scripts/composer.phar" )
if [ ! -x $COMPOSER ]; then
curl -sS 'https://getcomposer.org/installer' | php -- --install-dir="$BASEPATH/scripts";
COMPOSER="php $BASEPATH/scripts/composer.phar --dev";
else
$COMPOSER self-update;
fi
echo "Installing dependencies..."
$COMPOSER ${@:-install --prefer-source --no-interaction};
popd > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment