Skip to content

Instantly share code, notes, and snippets.

@invisiblek
Last active February 8, 2017 15:30
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 invisiblek/7ccb9c0a094361ed0403e8aa29535d6b to your computer and use it in GitHub Desktop.
Save invisiblek/7ccb9c0a094361ed0403e8aa29535d6b to your computer and use it in GitHub Desktop.
#!/bin/bash
sourcedir=/home/dp/lineage/14.1
function invisiblekremote() {
OIFS=$IFS
IFS='/'
topdir=`git rev-parse --show-toplevel`
repoarray=`cat "$topdir/.git/config" | grep -m1 "url = "`
for x in ${repoarray}; do
reponame=${x}
done
IFS=${OIFS}
git remote add invisiblek http://github.com/invisiblek/${reponame} > /dev/null 2> /dev/null
git fetch invisiblek 2> /dev/null
}
while read line; do
dir=`repo list | grep $line | awk '{print $1}'`
cd $dir
invisiblekremote
git merge invisiblek/cm-14.1_oms7
cd $sourcedir
done < ~/build_targets/substratum_repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment