Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VictorRodriguez/52b15ff870e2bd402337d5e279651dbc to your computer and use it in GitHub Desktop.
Save VictorRodriguez/52b15ff870e2bd402337d5e279651dbc to your computer and use it in GitHub Desktop.
#!/bin/bash
REPO="https://git.starlingx.io/"
declare -a arr=("stx-config" "stx-distcloud"
"stx-distcloud-client" "stx-fault" "stx-gui" "stx-ha"
"stx-nfv" "stx-update" "stx-metal")
for i in "${arr[@]}"
do
#git clone $REPO$i
cd "$i"
centos_diff=$(git log -p | grep centos | grep diff | wc -l)
diff=$(git log -p | grep diff | wc -l)
res=$(bc <<< "scale=3 ; $centos_diff/$diff * 100")
echo $i = $res %
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment