Skip to content

Instantly share code, notes, and snippets.

@ronanguilloux
Last active June 26, 2017 19:55
Show Gist options
  • Save ronanguilloux/09d710a5f37796cf759b to your computer and use it in GitHub Desktop.
Save ronanguilloux/09d710a5f37796cf759b to your computer and use it in GitHub Desktop.
Akeneo PIM CE 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-community-standard/tags | python -c 'import sys, json; print json.load(sys.stdin)[0]["name"]')
LAST_TAG_URL=$(curl -s https://api.github.com/repos/akeneo/pim-community-standard/tags | 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..."
curl -O archive.zip -q $CURL_URL
echo "Unzipping archive..."
unzip -q archive.zip -d ./
mv -f akeneo-pim-community-standard*/*.* ./
mv -f akeneo-pim-community-standard*/* ./
echo "Cleaning tmp files..."
rm -rf akeneo-pim-community-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