# Upload files to server using curl # Write header 1i\ --ftp-create-dirs\ --ftp-method nocwd\ -x :\ \ # Check for tmp files /.swp$/{s/.*/Error - tmp file found! (&)/;q;} /\#/{s/.*/Error - tmp file found! (&)/;q;} /delthis/{s/.*/Error - tmp file found! (&)/;q;} # Check that we have the correct format /^[AMD]\t/!{ s/.*/Damn...did not understand "&"/ q } # Copy only the www files /^[AMD]\twww/!d # Upload an added or modified file s_^[AM]\t\(.*\)_-T "\1"\n--url "ftp://:@/\1"_ # Remove a deleted file s_^D\t\(.*\)_-Q del "ftp://:@/\1"_