From dec49ce24dbf0087314b505cd14697eb752fcab0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 15 Oct 2011 03:10:11 -0700 Subject: [PATCH] Script to generate upload files for GNU FTP server. --- dist/make-upload-files | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 dist/make-upload-files diff --git a/dist/make-upload-files b/dist/make-upload-files new file mode 100755 index 000000000..f57ab5e08 --- /dev/null +++ b/dist/make-upload-files @@ -0,0 +1,28 @@ +#!/bin/bash +set -e + +if (( ${#} < 1 )); then + echo "usage: ${0} VERSION FILE..." + exit 1 +fi + +VERSION=${1} +shift + +if ! [[ ${VERSION} =~ ^[0-9.]+$ ]]; then + echo "${VERSION} doesn't look like a version number" + echo "usage: ${0} VERSION FILE..." + exit 1 +fi + +for FILE in "${@}"; do + rm -f "${FILE}".directive + cat > "${FILE}".directive <