Created
February 20, 2012 16:55
-
-
Save libryder/1870096 to your computer and use it in GitHub Desktop.
Easily push and pull files between servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file=$1 | |
| server=server.com | |
| user=user | |
| pass=pass | |
| bucket=/uploads | |
| dl_location=http://host.com | |
| function push_file() { | |
| ftp -invp "$server"<<ENDOFUPLOAD | |
| user $user $pass | |
| cd $bucket | |
| put $file | |
| bye | |
| ENDOFUPLOAD | |
| } | |
| function fetch_file() { | |
| wget "$dl_location"$1 ; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment