Skip to content

Instantly share code, notes, and snippets.

@mostafasoufi
Created September 1, 2018 08:12
Show Gist options
  • Save mostafasoufi/66c25f0e0f2af0b8b2bd956f11b76b70 to your computer and use it in GitHub Desktop.
Save mostafasoufi/66c25f0e0f2af0b8b2bd956f11b76b70 to your computer and use it in GitHub Desktop.
Run some commands in bulk project with bash script
#!/bin/bash
RED='\033[0;31m'
NC='\033[0m'
array=(
"project-name1"
"project-name2"
)
for i in ${array[*]}
do
echo -e "--------------------${RED} ${i} ${NC}---------------------"
cd $i
#git reset --hard
#git config --global credential.helper cache
#git pull
#composer update
#git add .
#git commit -m "Update composer"
#git push
cd ../
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment