commit: f65fd3799216d1d6753052bafc1af17f635ef8d8
parent: a0e4b6486346f19e433f0745a3eccf08ebaceb38
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 7 Oct 2018 22:00:29 +0200
Remove make.sh, fixup mkfile
Diffstat:
M | README | 22 | ++++++++++------------ |
D | make.sh | 49 | ------------------------------------------------- |
M | mkfile | 28 | ++++++++++++++-------------- |
3 files changed, 24 insertions(+), 75 deletions(-)
diff --git a/README b/README
@@ -1,17 +1,11 @@
This is my utils which lives in my home PATH (~/.local/bin).
-# Tested and working with
-* OS: Plan9Front, */Linux, OpenBSD
-* Compilers: 9c, gcc, clang, tcc
-* Shells: ape/sh, mksh, bash
-* Quality Checks:
- - C : LLVM scan-build, splint
- - Shell : shellsheck
-
-# Building
-Either/one-of:
-* ``mk && mk install`` (There is ports of ``mk`` in like Plan9Port for non-Plan9 systems)
-* ``./make.sh && ./make.sh install``
+# Dependencies
+* POSIX System
+* mk(1) (for the C programs)
+
+# Building & Installing
+* ``mk && mk install`` (There is ports of ``mk`` in Plan9Port)
# Programs and what they do
@@ -36,5 +30,9 @@ Prints your todo and calendar.
CSV is the format used because it’s simple to parse, the con is you cannot easily modify your columns (other than maybe add ones).
See example/calendar.csv and example/todo.csv for examples, *.csv are to be stored in ``${XDG_DATA_DIR:-$HOME/.local/share}/timey-whyme/``.
+## lolcat
+Does the same as https://github.com/busyloop/lolcat but has no options yet.
+Basically done it because I would want to avoid Ruby.
+
--
Copyright CC-BY-SA-4.0 2017 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
diff --git a/make.sh b/make.sh
@@ -1,49 +0,0 @@
-#!/bin/sh
-# Copyright CC-BY-SA-4.0 2017- Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-
-CC=${CC:-cc}
-CFLAGS=${CFLAGS:--Wall -Wextra -O2}
-PREFIX=${PREFIX:-/usr/local}
-BINDIR=${BINDIR:-${PREFIX}/bin}
-#LIBDIR=${LIBDIR:-${PREFIX}/lib}
-DOCDIR=${DOCDIR:-${PREFIX}/share/doc/lanodan-utils}
-
-echo "Warning: This tool is deprecated, please use mk (Plan9 tool) instead"
-
-usage() {
- echo "$0: [all|install]
-install uses PREFIX, LIBDIR, BINDIR, DOCDIR, environment variables"
-}
-
-all() {
- for i in $(cd src ; echo *.c); do
- echo "${PS4}${CC}" ${CFLAGS} -o "bin/${i%.c}" "[32msrc/${i}[0m"
- "${CC}" ${CFLAGS} -o "bin/${i%.c}" "src/${i}" || exit
- done
-}
-
-install() {
- set -x
- mkdir -p "${BINDIR}" && cp bin/* "${BINDIR}";
- mkdir -p "${DOCDIR}" && cp doc/* "${DOCDIR}";
- #mkdir -p "${LIBDIR}" && cp lib/* "${LIBDIR}";
-}
-
-clean() {
- rm -fr bin/*
-}
-
-case "$1" in
- all*|"")
- all
- ;;
- inst*)
- install
- ;;
- clean*)
- clean
- ;;
- *)
- usage
- ;;
-esac
diff --git a/mkfile b/mkfile
@@ -5,19 +5,19 @@ PREFIX="/usr/local"
BINDIR=$PREFIX"/bin"
DOCDIR=$PREFIX"/share/doc/lanodan-utils"
-srcs=`cd src ; ls *.c`
-bins=`echo $srcs | sed -r 's/\.c( )?/\1/g'`
-docs="cd docs ; ls"
+bins=`ls -d src/*.c | sed -e 's;src;bin;' -e 's;\.c$;;'`
-all: $srcs
- :
-install: all
+all:V: $bins
+
+install:V: all
for i in $bins; do cp bin/$i $BINDIR/; done
- for i in $docs; do cp docs/$i $DOCDIR/; done
-clean:
- cd bin
- rm -v $bins
-%.c:
- $CC $CFLAGS -o bin/$stem src/$stem.c
-lolcat.c:
- $CC $CFLAGS -lm -o bin/lolcat src/lolcat.c
+ cp -r docs $DOCDIR
+
+clean:V:
+ rm -f $bins
+
+bin/&: src/&.c
+ $CC $CFLAGS src/$stem.c -o bin/$stem
+
+bin/lolcat: src/lolcat.c
+ $CC $CFLAGS -lm src/lolcat.c -o bin/lolcat