Simplify the install of rsync-ssl by unifying 2 scripts.
[rsync.git] / prepare-source
blobe4232408e3c1f592d268055aa4ca620a9832219a
1 #!/bin/sh
2 # Either use autoconf and autoheader to create configure.sh and config.h.in
3 # or (optionally) fetch the latest development versions of generated files.
5 # Specify one action or more than one to provide a fall-back:
7 # build build the config files [the default w/no arg]
8 # fetch fetch the latest dev config files
9 # fetchgen fetch all the latest dev generated files
10 # fetchSRC fetch the latest dev source files [NON-GENERATED FILES]
12 # The script stops after the first successful action.
14 dir=`dirname $0`
15 if test x"$dir" != x -a x"$dir" != x.; then
16 cd "$dir"
19 if test $# = 0; then
20 set -- build
23 for action in "${@}"; do
24 case "$action" in
25 build|make)
26 make -f prepare-source.mak
28 fetch)
29 if perl --version >/dev/null 2>/dev/null; then
30 files='[ca]*'
31 else
32 files='[cap]*'
34 ./rsync-ssl -ip rsync://download.samba.org/rsyncftp/generated-files/"$files" .
36 fetchgen)
37 ./rsync-ssl -ip rsync://download.samba.org/rsyncftp/generated-files/'*' .
39 fetchSRC)
40 ./rsync-ssl -ipr --exclude=/.git/ rsync://download.samba.org/ftp/pub/unpacked/rsync/ .
43 echo "Unknown action: $action"
44 exit 1
45 esac
46 if test $? = 0; then
47 exit
49 done
51 exit 1