Skip to content

Instantly share code, notes, and snippets.

@bichotll
Last active December 16, 2015 06:08
Show Gist options
  • Save bichotll/5388873 to your computer and use it in GitHub Desktop.
Save bichotll/5388873 to your computer and use it in GitHub Desktop.
A wicked script for a wicked composer.
#a wicked script composer fix for a wicked unix
bic_wicked_composer() {
org_path=$PWD
sudo mkdir /tmp/mycomposerpath
sudo chown $USER /tmp/mycomposerpath
mv $org_path/* /tmp/mycomposerpath
cd /tmp/mycomposerpath
if [ ! -f /tmp/mycomposerpath/composer.phar ]
then
wget https://getcomposer.org/installer --no-check-certificate
mv installer composer.phar
fi
php composer.phar $@
mv /tmp/mycomposerpath/* $org_path
sudo rm -R /tmp/mycomposerpath
cd $org_path
}
alias composer_wicked='bic_wicked_composer'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment