2 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # Filename: bin/sde-update-tree
6 # Copyright (C) 2007 The OpenSDE Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- SDE-COPYRIGHT-NOTE-END ---
17 export SDEROOT
=$
( cd "${0%/*}/.."; pwd -P )
19 .
$SDEROOT/lib
/libsde.
in
22 local progname
=${0##*/}
24 Usage: $progname [FILES...]
30 options
=$
( getopt
-o "$shortopts" -l "$longopts" -- "$@" )
36 # load new arguments list
37 eval set -- "$options"
39 GITSERVER
=git
://git.opensde.net
41 while [ $# -gt 0 ]; do
45 *) echo_abort
1 "Unknown argument '$1', aborting."
50 # jump to the working tree's root
55 # hunt for the roots of the sub-working trees
57 for x
in $
( ls -1d . package package
/* target
/* 2> /dev
/null
); do
58 if [ ! -d "$x" ]; then
62 git clone
--quiet "$GITSERVER/opensde/$x-nopast.git" "$x"
65 echo "$tree/$x: missing" >&2
68 elif [ -d "$x/.git" ]; then
71 git fetch
--quiet && git
reset && git rebase origin