Mention updated config files.
[rsync.git] / prepare-source
index 8cc7911aff3c7dff24b5dbfb3b0001f3caff5273..a4e78e61ea63bd5970d95028bba5b3dfc17b709b 100755 (executable)
@@ -5,8 +5,8 @@
 # Specify one action or more than one to provide a fall-back:
 #
 #   build     build the config files [the default w/no arg]
-#   fetch     fetch the latest dev config files
-#   fetchgen  fetch all the latest dev generated files
+#   fetch     fetch the latest dev autoconfig files
+#   fetchgen  fetch all the latest dev generated files (including manpages)
 #   fetchSRC  fetch the latest dev source files [NON-GENERATED FILES]
 #
 # The script stops after the first successful action.
@@ -16,13 +16,12 @@ if test x"$dir" = x; then
     dir=.
 fi
 
-# Support automatic switching to build/$BRANCH subdirs.  It's also good
-# to put packaging/make somewhere early in your $PATH if you use this!
-if test "$dir" = . -a ! -f Makefile -a -d build/master -a -d .git; then
-    builddir=build/`git rev-parse --abbrev-ref HEAD | tr / %`
-    test -d "$builddir" || mkdir "$builddir"
-    cd "$builddir" || exit 1
-    dir=../..
+if test "$dir" = '.'; then
+    branch=`packaging/prep-auto-dir` || exit 1
+    if test x"$branch" != x; then
+       cd build || exit 1
+       dir=..
+    fi
 fi
 
 if test "$dir" != '.'; then
@@ -33,7 +32,7 @@ if test "$dir" != '.'; then
        fi
     done
     for fn in configure.sh config.h.in aclocal.m4; do
-       test ! -f $fn -a -f "$dir/$fn" && cp -p "$dir/$fn" $fn
+       test ! -f $fn && test -f "$dir/$fn" && cp -p "$dir/$fn" $fn
     done
 fi