mirror of
https://github.com/teddysun/across.git
synced 2025-01-18 22:09:35 +08:00
update comment
This commit is contained in:
parent
78d7889b07
commit
8ea5719756
@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Auto upload file(s) to FTP server
|
||||
# Upload file(s) to FTP server
|
||||
#
|
||||
# Copyright (C) 2016 Teddysun <i@teddysun.com>
|
||||
#
|
||||
# Argument example:
|
||||
# 1) ./ftp_upload.sh filename
|
||||
# 2) ./ftp_upload.sh filename1 filename2 filename3 ...
|
||||
# 3) ./ftp_upload.sh *.gz
|
||||
# 3) ./ftp_upload.sh *.extension
|
||||
#
|
||||
|
||||
########## START OF CONFIG ##########
|
||||
@ -63,7 +63,7 @@ ftp_upload() {
|
||||
local FTP_OUT_FILE="$1"
|
||||
echo "${FTP_OUT_FILE}" | grep "*" 2>&1 > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
ls ${FTP_OUT_FILE} 2>&1 > /dev/null
|
||||
ls ${FTP_OUT_FILE} 2>/dev/null
|
||||
[ $? -ne 0 ] && log "Error: [${FTP_OUT_FILE}] file(s) not exists!" && exit 1
|
||||
else
|
||||
[ ! -f ${FTP_OUT_FILE} ] && log "Error: [${FTP_OUT_FILE}] not exists!" && exit 1
|
||||
@ -87,8 +87,6 @@ STARTTIME=$(date +%s)
|
||||
|
||||
[ $# -eq 0 ] && log "Error: argument can not be empty!" && exit 1
|
||||
|
||||
log "Upload progress start"
|
||||
|
||||
check_command
|
||||
|
||||
for i in $@
|
||||
@ -96,8 +94,6 @@ do
|
||||
ftp_upload $i
|
||||
done
|
||||
|
||||
log "Upload progress complete"
|
||||
|
||||
ENDTIME=$(date +%s)
|
||||
DURATION=$((ENDTIME - STARTTIME))
|
||||
log "All done"
|
||||
|
Loading…
x
Reference in New Issue
Block a user