From 7227f9bb205da43a57af41764c4147ebb5230c4a Mon Sep 17 00:00:00 2001 From: hjp Date: Sun, 6 Apr 2003 10:44:06 +0000 Subject: [PATCH] Added savedate --- tiny/GNUmakefile | 1 + tiny/savedate | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100755 tiny/savedate diff --git a/tiny/GNUmakefile b/tiny/GNUmakefile index 070756a..8464a8d 100644 --- a/tiny/GNUmakefile +++ b/tiny/GNUmakefile @@ -16,6 +16,7 @@ install: \ $(BINDIR)/isodate \ $(BINDIR)/psg \ $(BINDIR)/save \ + $(BINDIR)/savedate \ fnp: fnp.sh fnpa: fnpa.sh diff --git a/tiny/savedate b/tiny/savedate new file mode 100755 index 0000000..f66c750 --- /dev/null +++ b/tiny/savedate @@ -0,0 +1,6 @@ +#!/bin/sh +now=`date '+%Y-%m-%dT%H:%M:%S'` +for i in "$@" +do + mv "$i" "$i.$now" && cp -p "$i.$now" "$i" +done