BASH   14
link common sh
Guest on 15th March 2023 02:11:37 PM


  1. #!/bin/bash
  2. set -e
  3. set -x
  4. for i in .git/refs/heads/*; do
  5.     j=$(basename $i)
  6.     git checkout $j;
  7.     test ! -d common || rm -rf common
  8.     git submodule add git://git.debian.org/~srivasta/debian-common.git common
  9.     perl -pli~ -e 's,url = git.*$,url = ssh://srivasta@git.debian.org/~srivasta/public_git/debian-common.git,' common/.git/config
  10.     git add .gitmodules common
  11.     git commit -m "Add common submodule to branch $j"
  12.     git status || true
  13.     git submodule status
  14. done

Raw Paste

Login or Register to edit or fork this paste. It's free.