#!/bin/bash if [[ "$#" -ne 2 ]]; then echo "Please provide both the username and password" exit 1 fi mkdir -p /root/.composer cat > /root/.composer/auth.json <<EOF { "http-basic": { "repo.magento.com": { "username": "$1", "password": "$2" } } } EOF