config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit c4c62232275a981abbf0a5dea3f85a145de68bb5
parent dbcfb771199229e829e23019e063f6a7688c19e5
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Wed,  3 May 2023 10:19:25 -0700

Remove resume script

I now opt to put full commands into my resume file such as

	mupdf book.pdf # p32

and then simply run something like

	grep book | sh -v

on it.

Diffstat:
Dlocal/bin/bin/resume | 40----------------------------------------
1 file changed, 0 insertions(+), 40 deletions(-)

diff --git a/local/bin/bin/resume b/local/bin/bin/resume @@ -1,40 +0,0 @@ -#!/bin/sh -# Copyright 2022 Jacob R. Edwards -# Resume reading a book using a page index -# -# Page index are of the form: -# path/to/book # location information -# I use p$n [ex. p5 for page 5] for my location information, so -# it's safest to use the same format in case I decide to do something -# other than just display the information. An example of this: -# classics/author/book.pdf # p95 - -book="$1" -export book -file="${2:-$HOME/books/resume}" -export file - -if test $# -lt 1 -then - cat < "$file" -else - base="$(dirname "$file")" - export base - awk -F ' +# +' ' - match($1, ENVIRON["book"]) { - if (book) { - print(book) - multiple = 1 - } - book = $1 - page = $2 - } - END { - if (multiple) - print(book) - else { - system("mupdf " ENVIRON["base"] "/" book " &") - system("herbe " page " &") - } - }' < "$file" -fi