logo

utils

~/.local/bin tools and git-hooks
commit: c83542cb6a171f1061570cb87f6253da01d8f02e
parent: b7afc99c488c8c2d4c78fad78b38146b523f3c6e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  1 Mar 2018 18:28:09 +0100

make.sh: Fix loop, less useless verbosity, add coloring

Diffstat:

Mmake.sh8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/make.sh b/make.sh @@ -14,12 +14,14 @@ install uses PREFIX, LIBDIR, BINDIR, DOCDIR, environment variables" } all() { - for i in src/*.c; do - "${CC}" "${CFLAGS}" -o "bin/${i%.c}" "src/${i}" + for i in $(cd src ; echo *.c); do + "${CC}" ${CFLAGS} -o "bin/${i%.c}" "src/${i}" + echo "${PS4}${CC}" ${CFLAGS} -o "bin/${i%.c}" "src/${i}" done } install() { + set -x mkdir -p "${BINDIR}" && cp bin/* "${BINDIR}"; mkdir -p "${DOCDIR}" && cp doc/* "${DOCDIR}"; #mkdir -p "${LIBDIR}" && cp lib/* "${LIBDIR}"; @@ -29,8 +31,6 @@ clean() { rm -fr bin/* } -set -x - case "$1" in all*|"") all