From 8f1508e20001e03068ac2d9a61ae93038282b525 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Thu, 18 Nov 2021 00:20:05 +0100 Subject: [PATCH] removed find -regex and merged pattern into awk command basically this means that rivet works on alpine (busybox) --- makefile | 2 +- rivet.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index 213e170..6d76eda 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -VERSION = 0.3 +VERSION = 0.3.1 PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man diff --git a/rivet.sh b/rivet.sh index 26b1c51..ec4eef8 100644 --- a/rivet.sh +++ b/rivet.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # Copyright (c) 2021 Alessandro Mauri # @@ -169,8 +169,7 @@ cp -r "$srcdir"/* "$destdir" rm -f "$destdir"/_header.html "$destdir"/_footer.html "$destdir"/_metadata.html # Generate an ordered (by open time) file list -find "$srcdir" -type f -regex '.*\/[^_].+\..*' -exec ls -1t {} + | - awk '/.*\.(md|html)$/' > "$objlist" +find "$srcdir" -type f -exec ls -1t {} + | awk '/^.*\/[^_].+\.(md|html)$/' > "$objlist" rm -f "$objdate" while IFS="" read -r file; do stat -c '%y' "$file" >> "$objdate"