From 1cac666ad85b662927d8235c0db8c0ee6d3d7cfd Mon Sep 17 00:00:00 2001 From: Dylan Lom Date: Wed, 18 Nov 2020 23:21:56 +1100 Subject: [PATCH] Add sign script Re-work into one big package, since a single package per script is kind of silly --- Makefile | 17 +++++++++++++++++ {timestamp/dist => dist}/DEBIAN/control | 6 +++--- src/sign | 10 ++++++++++ {timestamp/bin => src}/timestamp | 0 timestamp/Makefile | 10 ---------- 5 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 Makefile rename {timestamp/dist => dist}/DEBIAN/control (59%) create mode 100755 src/sign rename {timestamp/bin => src}/timestamp (100%) delete mode 100644 timestamp/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ed5d4c4 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +all: djl-utils.deb + +timestamp: src/timestamp + cp src/timestamp dist/usr/bin + +sign: src/sign + cp src/sign dist/usr/bin + +djl-utils.deb: timestamp sign + dpkg-deb -b dist + mv dist.deb dist/djl-utils.deb + +install: djl-utils.deb + dpkg -i dist/djl-utils.deb + +clean: + rm -f dist/usr/bin/* dist/djl-utils diff --git a/timestamp/dist/DEBIAN/control b/dist/DEBIAN/control similarity index 59% rename from timestamp/dist/DEBIAN/control rename to dist/DEBIAN/control index 949f1ac..8c292d5 100644 --- a/timestamp/dist/DEBIAN/control +++ b/dist/DEBIAN/control @@ -1,5 +1,5 @@ -Package: timestamp -Version: 1.0 +Package: djl-utils +Version: 0.0 Section: custom Priority: optional Architecture: all @@ -7,5 +7,5 @@ Essential: no Depends: tclsh Installed-Size: 1024 Maintainer: Dylan Lom -Description: Output the current date/time stamp in various formats. +Description: Various scripts diff --git a/src/sign b/src/sign new file mode 100755 index 0000000..b7c3608 --- /dev/null +++ b/src/sign @@ -0,0 +1,10 @@ +#!/usr/bin/env sh +# +# sign: generate a signature +# author: Dylan Lom +# licence: cc0 + +printf -- "--\n" +printf -- "$ %s@%s $ %s $\n" \ + "$(whoami)" "$(hostname)" \ + "$(date +"%Y-%m-%d %H:%M %Z")" diff --git a/timestamp/bin/timestamp b/src/timestamp similarity index 100% rename from timestamp/bin/timestamp rename to src/timestamp diff --git a/timestamp/Makefile b/timestamp/Makefile deleted file mode 100644 index f6dc2d9..0000000 --- a/timestamp/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -timestamp.deb: bin/timestamp - cp bin/timestamp dist/usr/bin/ - dpkg-deb -b dist - mv dist.deb dist/timestamp.deb - -install: timestamp.deb - dpkg -i dist/timestamp.deb - -clean: - rm dist/timestamp.deb dist/usr/bin/timestamp