File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -eu
4
+
5
+ TUNASYNC_TSUMUGU_MAXDELETE=${TUNASYNC_TSUMUGU_MAXDELETE:- 1000}
6
+ TUNASYNC_TSUMUGU_TIMEZONEFILE=${TUNASYNC_TSUMUGU_TIMEZONEFILE:- }
7
+ TUNASYNC_TSUMUGU_EXCLUDE=${TUNASYNC_TSUMUGU_EXCLUDE:- }
8
+ TUNASYNC_TSUMUGU_USERAGENT=${TUNASYNC_TSUMUGU_USERAGENT:- " tsumugu/" $(tsumugu --version | tail -n1 | cut -d' ' -f2)}
9
+ TUNASYNC_TSUMUGU_PARSER=${TUNASYNC_TSUMUGU_PARSER:- " nginx" }
10
+ TUNASYNC_TSUMUGU_THREADS=${TUNASYNC_TSUMUGU_THREADS:- " 2" }
11
+ TUNASYNC_TSUMUGU_OPTIONS=${TUNASYNC_TSUMUGU_OPTIONS:- }
12
+
13
+ if [[ -n $TUNASYNC_TSUMUGU_TIMEZONEFILE ]]; then
14
+ TUNASYNC_TSUMUGU_TIMEZONEFILE=" --timezone-file $TUNASYNC_TSUMUGU_TIMEZONEFILE "
15
+ fi
16
+
17
+ export NO_COLOR=1
18
+
19
+ [ ! -d " ${TUNASYNC_WORKING_DIR} " ] && mkdir -p " ${TUNASYNC_WORKING_DIR} "
20
+ cd ${TUNASYNC_WORKING_DIR}
21
+
22
+ tsumugu sync $TUNASYNC_TSUMUGU_TIMEZONEFILE --user-agent " $TUNASYNC_TSUMUGU_USERAGENT " --max-delete " $TUNASYNC_TSUMUGU_MAXDELETE " --parser " $TUNASYNC_TSUMUGU_PARSER " --threads " $TUNASYNC_TSUMUGU_THREADS " $TUNASYNC_TSUMUGU_EXCLUDE $TUNASYNC_TSUMUGU_OPTIONS " $TUNASYNC_UPSTREAM_URL " " $TUNASYNC_WORKING_DIR "
You can’t perform that action at this time.
0 commit comments