mrconfig-update 731 Bytes
Newer Older
Cyril Brulebois's avatar
Cyril Brulebois committed
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh
set -e

# Move to xsf-tools directory:
cd $(dirname $0)

# Configuration variables:
host=git.debian.org
home=/git/pkg-xorg
tools_repo=debian/xsf-tools.git
mrconfig=mrconfig

# Some blurb to make everything work:
14 15 16 17
sed \
 -e "s,@@host@@,$host,g" \
 -e "s,@@home@@,$home,g" \
 mrconfig.head > $mrconfig
Cyril Brulebois's avatar
Cyril Brulebois committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

# Build a list of repositories based on the actual repositories on the
# server:
repos=$(ssh $host find $home -name '*.git'|sort|sed "s,^$home/,,")
for repo in $repos; do
  case $repo in
    # Comment those, just in case people need them at some point:
    attic/*)
      echo "#[$repo]"
    ;;
    # Real repository:
    *)
      echo "[$repo]"
    ;;
  esac
done >> $mrconfig

rm -f $tmp

# Move back:
cd - > /dev/null