composer-install.sh 320 B

123456789101112131415161718
  1. #!/bin/bash
  2. start=`date +%s`
  3. chmod 0400 keys/*
  4. eval $(ssh-agent)
  5. ssh-add keys/bitbucket.id_rsa
  6. command="composer install --no-progress -n $@"
  7. echo -e "Command: \e[42m$command\e[0m"
  8. $command
  9. kill $SSH_AGENT_PID
  10. unset SSH_AGENT_PID
  11. end=`date +%s`
  12. runtime=$((end-start))
  13. echo -e "\e[42mExecution time: $runtime s\e[0m"