-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync-me.sh
46 lines (37 loc) · 927 Bytes
/
sync-me.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
40
41
42
43
44
45
46
#!/bin/bash
##
## Utiliza o sync-it para sincronizar de acordo com as configurações no custom/custom-setup.sh
##
## TJSC / DTI / DAD
## Secao de Sistemas Operacionais
## Autor: Herbert Mattei de Borba <[email protected]>
##
## v2
##
MYDIR=`dirname $0`
. ${MYDIR}/common-setup.sh
function showusage {
echo "Modo de usar: ${MYNME}"
exit ${ERROR}
}
#ARGV=${@}
#if [ "x$ARGV" = "x" ] ; then
# set_error $ERR_ARGUMENT_NOT_FOUND
# showusage
#fi
param_verbose=""
while getopts "v" option ; do
case "${option}" in
v)
param_verbose="-v"
;;
?)
set_error $ERR_INVALID_PARAMETER
showusage
;;
esac
done
log_file="${LOG_PATH}/sync-me-${SYNC_HOST}-${SYNC_SRC//\//^}-${DATAHORAHJPREC}.log"
exclude_expr="custom/"
${MYDIR}/sync-it.sh -h ${SYNC_HOST} -s ${SYNC_SRC} -u ${SYNC_USR} -b ${SYNC_BKP} -l ${log_file} -x ${exclude_expr} ${param_verbose}
exit $ERROR