pthbs

Packaging Through Hashed Build Scripts
git clone https://ccx.te2000.cz/git/pthbs
Log | Files | Refs | Submodules | README

update-links (314B)


      1 #!/bin/zsh
      2 cd $0:h || exit $?
      3 mkdir -p by-commit || exit $?
      4 cd by-commit || exit $?
      5 for gitdir in ../*/.git; do
      6 	d=$gitdir:h
      7 	(cd $d && git for-each-ref --format='%(objectname)' && git show -s --pretty=format:%H%n) | while read commit; do
      8 		[[ -L $commit ]] && continue
      9 		ln -s -f $d $commit || exit $?
     10 	done
     11 done