Skip to content

Instantly share code, notes, and snippets.

@ronanguilloux
Last active October 6, 2016 06:55
Show Gist options
  • Save ronanguilloux/845ad055c5b572ba570c to your computer and use it in GitHub Desktop.
Save ronanguilloux/845ad055c5b572ba570c to your computer and use it in GitHub Desktop.
Akeneo PIM EE install script
#! /bin/bash
#
# install.sh
# Distributed under terms of the MIT license.
# Usage: $ install.sh
# Need a github-oauth.github.com in your global composer conf
#
LAST_TAG_NAME=$(curl -s https://api.github.com/repos/akeneo/pim-enterprise-standard/tags\?access_token\=$GITHUB_TOKEN | python -c 'import sys, json; print json.load(sys.stdin)[0]["name"]')
LAST_TAG_URL=$(curl -s https://api.github.com/repos/akeneo/pim-enterprise-standard/tags\?access_token\=$GITHUB_TOKEN | python -c 'import sys, json; print json.load(sys.stdin)[0]["zipball_url"]')
CURL_URL=$LAST_TAG_URL?access_token=$GITHUB_TOKEN
echo "Downloading $LAST_TAG_NAME tag archive FROM $CURL_URL..."
wget -O archive.zip -q $CURL_URL
echo "Unzipping archive..."
unzip -q archive.zip -d ./
mv -f akeneo-pim-enterprise-standard*/*.* ./
mv -f akeneo-pim-enterprise-standard*/* ./
echo "Cleaning tmp files..."
rm -rf akeneo-pim-enterprise-standard*
rm archive.zip
echo "Installing vendors:"
composer config -g github-oauth.github.com $GITHUB_TOKEN
php -dmemory_limit=-1 /usr/local/bin/composer install -o --prefer-dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment