#!/bin/sh #upload only certain file types from specified directory via ftp : ${wget:=/usr/local/bin/wget} buoyDir=$1 if [ -z "$1" ]; then cat <&2 Upload specified file types from a specific directory via ftp Usage: $0 host/userDir --accept filetypes --reject filelist example: $0 moe/esp --accept out,hex,pcr uploads *.out, *.hex, and *.pcr files from esp user on espmoe EOS exit 1 fi shift . `dirname $0`/uploading.sh uploading=$PWD/.UPLOADING.pid claim $uploading $wget -Nc -nH $@ ftp://$buoyDir/* & #background to trap signals! wait $! || exit $? echo "*** Specified files in $buoyDir Synchronized $@ ***"