You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
583 B
24 lines
583 B
#!/bin/sh |
|
password=liudongqi |
|
|
|
cd ../../ |
|
mkdir dict |
|
tar -vczf ./dict/dict.tar.gz --exclude='./docs' --exclude='./dict' * |
|
|
|
# sftp 上传 |
|
/usr/bin/expect <<-EOF |
|
set timeout -1 |
|
spawn sftp -P 60022 liudongqi@oxxokclwrj-public.bastionhost.aliyuncs.com |
|
expect { |
|
"*yes/no" { send "yes\r"; exp_continue } |
|
"*password:" { send "$password\r" } |
|
} |
|
expect "sftp>" |
|
send "cd ssh_deploy@qry-test-uat-fetch_172.16.31.221:22\r" |
|
expect "sftp>" |
|
send "put ./dict/dict.tar.gz ./rsjs/qry-python-js/dict.tar.gz\r" |
|
expect "sftp>" |
|
send "exit\r" |
|
# interact |
|
EOF |
|
echo "upload success"
|
|
|