Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fjen Undso
myftpdumper
Commits
dbd8c4f3
Commit
dbd8c4f3
authored
Mar 09, 2017
by
Fjen Undso
Browse files
fix ftpdelete
parent
c326a97b
Changes
1
Hide whitespace changes
Inline
Side-by-side
myftpdumper.sh
View file @
dbd8c4f3
...
...
@@ -132,6 +132,7 @@ else
fi
### FTP: delete old backups
echo
"### Delete old backups on FTP..."
ftpfiles
=
$(
execftp
"cd
$FTPDIR
; nlist; exit"
)
# filter files starting with a dot
ftpfiles
=(
$(
echo
$ftpfiles
|
sed
's,\.[A-Za-z0-9_\/\.]* , ,g'
)
)
...
...
@@ -143,7 +144,7 @@ else
done
# delete on ftp
[
${#
ftpfilesdelete
[@]
}
-ge
1
]
\
&&
ftpfilesdelete
=
${
ftpfilesdelete
[@]
}
\
# lftp has problems with arrays
&&
ftpfilesdelete
=
${
ftpfilesdelete
[@]
}
\
&&
execftp
"cd
$FTPDIR
; rm -r
$ftpfilesdelete
; exit"
### FTP: upload
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment