From c9b56e3a4db6bf8c4595ca5ea161289678ea2865 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 11 Oct 2013 11:35:06 -0400 Subject: process-incoming: Remove processed files. --- diff --git a/NEWS b/NEWS index f1b93b9..038a315 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +ProteanOS Archive Manager version ?.?.? +--------------------------------------- + +Released: ????-??-?? + +Changes in this release: + + * The process-incoming command now removes processed files. + ProteanOS Archive Manager version 1.0.0 --------------------------------------- diff --git a/lib/cmd/process-incoming.sh b/lib/cmd/process-incoming.sh index 0d0b155..52f7480 100644 --- a/lib/cmd/process-incoming.sh +++ b/lib/cmd/process-incoming.sh @@ -24,6 +24,7 @@ use include cmd_process_incoming_main() { local changes= + local file= info "$(get_msg 'cmd_process_incoming_processing')" @@ -31,6 +32,12 @@ cmd_process_incoming_main() if [ ! -f "${changes}" ]; then continue fi - include_changes "${changes}" + for file in $(include_changes "${changes}"); do + if [ ! -f "${file}" ]; then + continue + fi + rm -f "${file}" + done + rm -f "${changes}" done } -- cgit v0.9.1