Skip to content

Instantly share code, notes, and snippets.

@nickfun
Created December 16, 2022 05:02
Show Gist options
  • Save nickfun/412fd5bbb55eb0bfa04c09e7e6762eea to your computer and use it in GitHub Desktop.
Save nickfun/412fd5bbb55eb0bfa04c09e7e6762eea to your computer and use it in GitHub Desktop.
git project folders update
app-dequeue
architecture
messaging-service-configuration
messaging-service-event-handler
messaging-service-send
number-pool-service
ratequeue
scala-service
sticky-sender-service
supernetwork-status-analyzer-csg
messaging-cluster-tests
messaging-service-orchestrator
messaging-services-terraform
#!/bin/bash
source ~/bin/colors.sh
CONCUR=5
if [ -z $1 ]
then
pushd `pwd`
cd ~/Projects
time cat repos-to-update.txt | xargs -P $CONCUR -n 1 ./update.sh
figlet Done
popd
else
clr_escape "Begin: $1" $CLR_BLUE $CLR_BLACKB
cd $1
git checkout master && git pull
if [ "$?" -eq "1" ]; then
git checkout main && git pull
fi
git checkout master && git pull
if [ "$?" -eq "1" ]; then
git checkout main && git pull
fi
if [ $? -eq 0 ]
then
clr_escape "End: $1" $CLR_GREEN $CLR_BLACKB
else
clr_escape "ERROR: NOT UPDATED $1" $CLR_RED $CLR_BLACKB
echo $1 __ $(date) >> ~/Projects/error-update.txt
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment