#!/bin/sh

# Get ENV variable
PREFIX=${PREFIX:='/usr/local'}

# Clone the git repo
git clone https://github.com/carakas/fork-cms-module-generator.git $PREFIX/fork-cms-module-generator

# cd to the fork-cms-module-generator directory
cd $PREFIX/fork-cms-module-generator

# Get composer
curl -sS https://getcomposer.org/installer | php

# Install dependencies using composer
php composer.phar install

# Symlink to $PREFIX/bin
ln -s $PREFIX/fork-cms-module-generator/app/console $PREFIX/bin/module-generator

# Get back to where we once belonged
cd -

if [ -e ~/.bash_profile ]
then
    echo "eval \$(module-generator _completion --generate-hook)" >> ~/.bash_profile
fi
if [ -e ~/.zshrc ]
then
    echo "eval \$(module-generator _completion --generate-hook)" >> ~/.zshrc
fi

#!/bin/sh

# Get ENV variable
PREFIX=${PREFIX:='/usr/local'}

# Clone the git repo
git clone https://github.com/carakas/fork-cms-module-generator.git $PREFIX/fork-cms-module-generator

# cd to the fork-cms-module-generator directory
cd $PREFIX/fork-cms-module-generator

# Get composer
curl -sS https://getcomposer.org/installer | php

# Install dependencies using composer
php composer.phar install

# Symlink to $PREFIX/bin
ln -s $PREFIX/fork-cms-module-generator/app/console $PREFIX/bin/module-generator

# Get back to where we once belonged
cd -

if [ -e ~/.bash_profile ]
then
    echo "eval \$(module-generator _completion --generate-hook --shell-type=bash)" >> ~/.bash_profile
fi
if [ -e ~/.zshrc ]
then
    echo "eval \$(module-generator _completion --generate-hook --shell-type=zsh)" >> ~/.zshrc
fi

Add shell definition to be sure
Add shell definition to be sure
