Skip to content

Instantly share code, notes, and snippets.

@elchingon
Created February 27, 2015 00:02
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 elchingon/b189583400fa60b5ef9e to your computer and use it in GitHub Desktop.
Save elchingon/b189583400fa60b5ef9e to your computer and use it in GitHub Desktop.
Git bash scripts
#!/bin/bash
i =0
while read p; do
let "i += 1"
if [[ $p == *"git"* ]]
then
if [[ $p != *"master.git"* && $p != *"fabi-ios"* ]]
then
echo "cloning $p"
git clone $p
fi
fi
done <repo_list.txt
#!/bin/bash
path="/home/fabihelp/repo_baks/"
while read p; do
echo $path$p
if [[ -d $path$p ]]
then
cd $path$p
echo "fetching $p"
git fetch --all
git pull origin master
fi
done <repo_dir_list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment