summaryrefslogtreecommitdiff
path: root/migration-end.sh
blob: 84ad279fe3cf7ffca8935f6d4c142d2773437557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

if [ ! $1 ]; then
	echo "insufficient number of arguments passed"
	exit
elif [ $1 = "laptop" ]; then
	repo=laptop
elif [ $1 = "pc" ]; then
	repo=origin
fi

export PATH=/usr/bin:$PATH

# $1: folder name, $2: git add required or not
fetch_repo()
{
	echo ""
	echo $1
	cd $HOME/$1
	git fetch -p $repo
	git checkout master
	git reset --hard $repo/master
}

for i in `cat $HOME/scripts/migration-repos.txt`; do
	fetch_repo $i
done

cd $HOME/scripts/
GIT_EDITOR=cat git revert 75592b4ebf4b
fetchmail -d 60 -L ~/.fetchmaillog