ste

Једноставни уређивач табела
git clone https://git.sr.ht/~strahinja/ste
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување ca19dfe55cf3c51cca3af59c08fef638e0468bcb
родитељ e8bbee678e1513fd79648d606fa00d28341af8ef
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Fri, 29 Sep 2023 09:57:30 +0200

Change build scripts to make .gz optional; add note about OpenBSD

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
MINSTALL | 11++++++++++-
Mall.do | 4++--
Mclean.do | 2+-
Mconfig.redo | 11+++++++++++
Minstall.do | 17+++++++----------
Muninstall.do | 13++++++-------
измењених датотека: 6, додавања: 37(+), брисања: 21(-)

diff --git a/INSTALL b/INSTALL @@ -1,16 +1,25 @@ Prerequisites ============= -* gzip * Standard utilities: awk, cat, cp, cut, diff, getopts, grep, head, mv, printf, rm, sed, tail, touch, trap, wc * table[1] * vipe from moreutils[2] * Any text editor set via EDITOR environment variable + +OpenBSD +------- + +Change MANDIR in config.redo to + + MANDIR=$PREFIX/man/man1 + + Optional -------- +* gzip (autodetected, for manpage compression) * rlwrap[3] (autodetected, fallback if absent) for command line editing [1]: https://strahinja.srht.site/table/ diff --git a/all.do b/all.do @@ -1,2 +1,2 @@ -redo-ifchange ste ste.1.gz transpose.1.gz tsvdel.1.gz tsvedit.1.gz \ - tsvfind.1.gz tsvins.1.gz tsvmove.1.gz +. ./config.redo +redo-ifchange ste $MANPAGES diff --git a/clean.do b/clean.do @@ -1,2 +1,2 @@ redo-always -rm -f ste ste.1 ste.1.gz *~ version date +rm -f ste *.1 $MANPAGES *~ version date diff --git a/config.redo b/config.redo @@ -1 +1,12 @@ PREFIX=${PREFIX:-/usr/local} + +BINDIR=$PREFIX/bin +DOCDIR=$PREFIX/share/doc/ste + +MANDIR=$PREFIX/share/man/man1 +# OpenBSD +#MANDIR=$PREFIX/man/man1 + +PROGS="ste transpose tsvdel tsvedit tsvfind tsvins tsvmove" +MANSUFFIX=${MANSUFFIX-$(command -v gzip >/dev/null && printf ".gz")} +MANPAGES=$(for prog in $PROGS; do printf "%s.1%s\n" "$prog" "$MANSUFFIX"; done) diff --git a/install.do b/install.do @@ -1,16 +1,13 @@ redo-ifchange all . ./config.redo -BINDIR=$PREFIX/bin -#DOCDIR=$PREFIX/share/doc/ste -MANDIR=$PREFIX/share/man/man1 -#install -d $DOCDIR -#for docfile in README; do -# install -Dm 0644 "${docfile}" "${DOCDIR}/${docfile}" -#done +install -d $DOCDIR +for docfile in README LICENSE; do + install -Dm 0644 "${docfile}" "${DOCDIR}/${docfile}" +done install -d $BINDIR $MANDIR -for binfile in ste transpose tsvdel tsvedit tsvfind tsvins tsvmove; do +for binfile in $PROGS; do install -m 0755 "${binfile}" "${BINDIR}/${binfile}" done -for manfile in ste transpose tsvdel tsvedit tsvfind tsvins tsvmove; do - install -m 0644 "${manfile}.1.gz" "${MANDIR}/${manfile}.1.gz" +for manfile in $MANPAGES; do + install -m 0644 "${manfile}" "${MANDIR}/${manfile}" done diff --git a/uninstall.do b/uninstall.do @@ -1,12 +1,11 @@ redo-always . ./config.redo -BINDIR=$PREFIX/bin -#DOCDIR=$PREFIX/share/doc/ste -MANDIR=$PREFIX/share/man/man1 -for binfile in ste transpose tsvdel tsvedit tsvfind tsvins tsvmove; do +for docfile in README LICENSE; do + rm -f "${DOCDIR}/${docfile}" +done +for binfile in $PROGS; do rm -f "${BINDIR}/${binfile}" done -for manfile in ste transpose tsvdel tsvedit tsvfind tsvins tsvmove; do - rm -f "${MANDIR}/${manfile}.1.gz" +for manfile in $MANPAGES; do + rm -f "${MANDIR}/${manfile}" done -#$(find $DOCDIR -type f)