Created
February 27, 2015 00:02
-
-
Save elchingon/b189583400fa60b5ef9e to your computer and use it in GitHub Desktop.
Git bash scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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