Skip to content

Instantly share code, notes, and snippets.

@invisiblek
Created December 6, 2016 19:15
Show Gist options
  • Save invisiblek/0278470e8d1cf8b21125c92692bf61b9 to your computer and use it in GitHub Desktop.
Save invisiblek/0278470e8d1cf8b21125c92692bf61b9 to your computer and use it in GitHub Desktop.
#!/bin/bash
rm -f ~/diffs/*
while read l; do
mod=`echo $l | awk '{print $2}'`
if [[ ! $mod == "" ]] && [[ ! $mod == "forcepush" ]]; then
dir=`echo $l | awk '{print $1}'`
cd $dir
r=`cat .git/config | grep "url = [email protected]:invisiblek" | sed 's/ url = [email protected]:invisiblek\///g'`
repo=https://github.com/Rashed97/$r
git remote rm rashed 2> /dev/null
git remote add rashed $repo
git fetch rashed 2> /dev/null
# git diff blek/cm-14.1_android-7.1.1_r4 rashed/cm-14.1 > ~/diffs/$r
# echo "$r `gist -t diff ~/diffs/$r`" >> ~/diffs/links
cd - > /dev/null
fi
done < ~/merged_repos
#gist ~/diffs/links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment