| 1 | #!/bin/sh -e |
| 2 | # This configure script ensures that the configure.sh script exists, and |
| 3 | # if not, it tries to fetch rsync's generated files or build them. We |
| 4 | # then transfer control to the configure.sh script to do the real work. |
| 5 | |
| 6 | dir=`dirname $0` |
| 7 | realconfigure="$dir/configure.sh" |
| 8 | |
| 9 | if [ ! -f "$realconfigure" ]; then |
| 10 | if test x"$dir" != x -a x"$dir" != x.; then |
| 11 | curdir=`pwd` |
| 12 | cd "$dir" |
| 13 | else |
| 14 | curdir='' |
| 15 | fi |
| 16 | make -f prepare-source.mak proto.h |
| 17 | if make -f prepare-source.mak conf; then |
| 18 | : |
| 19 | else |
| 20 | rsync -avz rsync://rsync.samba.org/rsyncftp/generated-files/'c*' . |
| 21 | fi |
| 22 | if test x"$curdir" != x; then |
| 23 | cd "$curdir" |
| 24 | fi |
| 25 | fi |
| 26 | |
| 27 | exec "$realconfigure" "${@}" |