#!/bin/bash
SCRIPT_PATH=`dirname "$0"`
SCRIPT_PATH=`( cd "$SCRIPT_PATH" && pwd )`
cd $SCRIPT_PATH

if [ -f composer.phar ]
then
    echo composer.phar file exists
else
    if [ `command -v curl` ]
    then
        curl -s http://getcomposer.org/installer | php
    elif [ `command -v wget` ]
    then
        wget http://getcomposer.org/composer.phar
    else
        php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
    fi
    chmod 777 composer.phar    
fi
