|
1 | 1 | # This is only here as an example and has not been tested! |
2 | 2 | # |
3 | | -# The build files must have already been generated by cmake. |
| 3 | +# This *must* be run from the rdiff directory where this |
| 4 | +# file is located! |
4 | 5 |
|
5 | | -LIBRSYNC_DIR="" |
6 | | -LIBRSYNC_BUILD_DIR="" |
| 6 | +# Root directory of librsync |
| 7 | +LIBRSYNC_DIR="PATH_TO_LIBRSYNC_SRC_DIR" |
| 8 | + |
| 9 | +# Directory where generated Makefile and generate source code will |
| 10 | +# be saved. |
| 11 | +LIBRSYNC_BUILD_DIR="$LIBRSYNC_DIR/build" |
7 | 12 |
|
8 | 13 | if [[ ! -d "$LIBRSYNC_DIR" ]]; then |
9 | 14 | echo "Invalid LIBRSYNC_DIR: $LIBRSYNC_DIR" |
10 | 15 | fi |
11 | 16 |
|
12 | | -if [[ ! -d "$LIBRSYNC_BUILD_DIR" ]]; then |
13 | | - echo "Invalid LIBRSYNC_BUILD_DIR: $LIBRSYNC_BUILD_DIR" |
14 | | -fi |
| 17 | +# librsync install: (uncomment to run) |
| 18 | +# |
| 19 | +# # This is where the library would be saved if 'make' is ran on the |
| 20 | +# # resulting build files. This is not actually used, but is good to |
| 21 | +# # set (in case someone decides to run 'make install') as it prevents |
| 22 | +# # overwriting the librsync library in /usr/local. |
| 23 | +# LIBRSYNC_INSTALL_DIR="$LIBRSYNC_DIR/install" |
| 24 | +# |
| 25 | +# mkdir "$LIBRSYNC_BUILD_DIR" |
| 26 | +# mkdir "$LIBRSYNC_INSTALL_DIR" |
| 27 | +# |
| 28 | +# pushd "$LIBRSYNC_BUILD_DIR" |
| 29 | +# cmake \ |
| 30 | +# -DCMAKE_INSTALL_PREFIX:PATH="$LIBRSYNC_INSTALL_DIR" \ |
| 31 | +# -DCMAKE_BUILD_TYPE:STRING="Release" \ |
| 32 | +# "$LIBRSYNC_DIR" |
| 33 | +# popd |
| 34 | +# |
| 35 | +# if [[ ! -d "$LIBRSYNC_BUILD_DIR" ]]; then |
| 36 | +# echo "Invalid LIBRSYNC_BUILD_DIR: $LIBRSYNC_BUILD_DIR" |
| 37 | +# fi |
15 | 38 |
|
| 39 | +# Remove any C source code artifacts from rdiff directory. |
16 | 40 | rm -vf *.[ch] |
17 | 41 |
|
| 42 | +# We need glob expansion - so $LIBRSYNC_DIR better not contain |
| 43 | +# any spaces!! |
18 | 44 | cp $LIBRSYNC_BUILD_DIR/src/*.[ch] |
19 | 45 | cp $LIBRSYNC_DIR/src/*.[ch] |
20 | 46 | rm -v rdiff.c |
0 commit comments