forked from zerdliu/www.baidu-ops.com
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_deploy.sh
More file actions
43 lines (33 loc) · 679 Bytes
/
_deploy.sh
File metadata and controls
43 lines (33 loc) · 679 Bytes
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
#!/bin/bash
function data_upload_ftp() {
USER=""
PASS=""
ftp -inv 174.120.207.225 << EOF
user $USER $PASS
cd public_html
mput _site
close
bye
EOF
}
function data_upload_lftp() {
HOST="174.120.207.225"
USER=""
PASS=""
LCD="_site"
RCD="public_html/"
lftp -c "
set ssl:verify-certificate no
set ftp:list-options -a;
open ftp://$USER:$PASS@$HOST;
lcd $LCD;
cd $RCD;
mirror --reverse \
--delete \
--verbose \
--exclude-glob a-dir-to-exclude/ \
--exclude-glob a-file-to-exclude \
--exclude-glob a-file-group-to-exclude* \
--exclude-glob other-files-to-esclude"
}
data_upload_lftp