File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
3
if [ " x$3 " = " x" ]; then
4
- echo " Syntax: $0 <rsync-options> <src-dir> <target-dir>"
4
+ echo " Syntax: $0 <rsync-options> <src-dir> <target-dir> [run-size-mb] "
5
5
exit 1
6
6
fi
7
7
@@ -12,6 +12,13 @@ RSYNC_OPTIONS=$1
12
12
SRC_DIR=" ` realpath $2 ` "
13
13
TARGET_DIR=" ` realpath $3 ` "
14
14
15
+ # Run size in Mbs.
16
+ if [ " x$4 " = " x" ]; then
17
+ RUN_SIZE=256
18
+ else
19
+ RUN_SIZE=$4
20
+ fi
21
+
15
22
# Validate directories.
16
23
if [ ! -d $SRC_DIR ]; then
17
24
echo " Source directory invalid: $SRC_DIR "
25
32
# Debug.
26
33
echo " "
27
34
echo " Backing up:"
28
- echo " Source directory: $SRC_DIR "
29
- echo " Target directory: $TARGET_DIR "
35
+ echo " Source directory: $SRC_DIR / "
36
+ echo " Target directory: $TARGET_DIR / "
30
37
echo " Rsync options: $RSYNC_OPTIONS "
38
+ echo " Run size in Mb: $RUN_SIZE "
39
+ echo " Command:"
40
+ echo " gigasync --run-size '$RUN_SIZE ' '$SRC_DIR /' '$TARGET_DIR /'"
31
41
echo " "
32
42
33
43
# Execute.
34
44
export RSYNC_OPTIONS=$RSYNC_OPTIONS
35
- gigasync " $SRC_DIR " " $TARGET_DIR "
45
+ gigasync --run-size $RUN_SIZE " $SRC_DIR / " " $TARGET_DIR / "
You can’t perform that action at this time.
0 commit comments