#!/bin/sh # File: fuss-upload.sh # Goal: wrap around curl to include the timestamp header to fuss test -z "${INFILE}" && INFILE="${1}" test -z "${FUSS_URL}" && FUSS_URL="${2}" test ! -r "${INFILE}" && { echo "Cannot read file ${INFILE}. Aborted." 1>&2 ; exit 1; } lastModified="$( stat -c "%Y" "${INFILE}" )" curl -v --header "lastModified: ${lastModified}" -F "file=@${INFILE}" "${FUSS_URL}"