gitrefresh

Easily export, reinitialize and update all git repositories in a file hierarchy
git clone git://git.defalsify.org/gitrefresh.git
Info | Log | Files | Refs | README | LICENSE

test_list.sh (498B)


      1 wd=$(pwd)
      2 
      3 if [ ! -f ./gitrefresh.sh ]; then
      4 	>&2 echo please run from code repository root
      5 	exit 1;
      6 fi
      7 
      8 export ts=$(mktemp -d)
      9 export td=$(mktemp -d)
     10 export r=$(mktemp)
     11 pushd $ts
     12 
     13 ds=(a b c)
     14 for d in ${ds[@]}; do
     15 	mkdir -v $d
     16 	pushd $d
     17 	git init
     18 	uuidgen > data.txt
     19 	git add data.txt
     20 	git commit -m "initial commit"
     21 	popd
     22 	pushd $td
     23 	repo="file://$ts/$d"
     24 	echo $repo >> $r
     25 	git clone $repo
     26 	popd
     27 done
     28 popd
     29 
     30 vr=$(mktemp)
     31 vl=$(mktemp)
     32 sort $r > $vr
     33 
     34 bash ./gitlist.sh $td | sort > $vl
     35 
     36 diff $vr $vl