-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare.sh
39 lines (30 loc) · 1.26 KB
/
prepare.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
if [[ "$GWBACKUPY_PREPARED" == "yes" ]]; then
return 0
fi
GWBACKUPY_PREPARED="yes"
if [[ "$GWBACKUPY_ACCOUNT_EMAILS" == "[email protected] [email protected]" ]]; then
echo "Please provide GWBACKUPY_ACCOUNT_EMAILS, currently is: $GWBACKUPY_ACCOUNT_EMAILS"
exit 1
fi
if [[ "$GWBACKUPY_LOG_LEVEL" != "" ]]; then
GWBACKUPY_MAIN_ARGS="--log-level=$GWBACKUPY_LOG_LEVEL $GWBACKUPY_MAIN_ARGS"
fi
if [[ "$GWBACKUPY_CREDENTIALS_FILEPATH" != "" ]]; then
GWBACKUPY_MAIN_ARGS="--credentials-filepath=$GWBACKUPY_CREDENTIALS_FILEPATH $GWBACKUPY_MAIN_ARGS"
fi
if [[ "$GWBACKUPY_SERVICE_ACCOUNT_KEY_FILEPATH" != "" ]]; then
GWBACKUPY_MAIN_ARGS="--service-account-key-filepath=$GWBACKUPY_SERVICE_ACCOUNT_KEY_FILEPATH $GWBACKUPY_MAIN_ARGS"
fi
if [[ "$GWBACKUPY_OAUTH_REDIRECT_HOST" != "" ]]; then
GWBACKUPY_MAIN_ARGS="--oauth-redirect-host=$GWBACKUPY_OAUTH_REDIRECT_HOST $GWBACKUPY_MAIN_ARGS"
fi
if [[ "$GWBACKUPY_OAUTH_PORT" != "" ]]; then
GWBACKUPY_MAIN_ARGS="--oauth-port=$GWBACKUPY_OAUTH_PORT $GWBACKUPY_MAIN_ARGS"
fi
if [[ "$GWBACKUPY_WORKDIR" != "" ]]; then
GWBACKUPY_MAIN_ARGS="--workdir=$GWBACKUPY_WORKDIR $GWBACKUPY_MAIN_ARGS"
fi
if [[ "$GWBACKUPY_MAIN_ARGS" != "" ]]; then
echo "Gwbackupy run with following main arguments: $GWBACKUPY_MAIN_ARGS"
fi