logo

utils-std

Collection of commonly available Unix tools
commit: 910e99b2b9f92ba209f6317a7604b4c4128bbbee
parent afe6c1a38ba79de509f9db060818dc3a561b13c2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  2 May 2024 01:25:59 +0200

Put command symlinks in git and preserve them at install time

This allows to use them while bootstrapping a userland with PATH containing $PWD/cmd

Diffstat:

MMakefile8++++----
Acmd/[2++
Acmd/chgrp2++
3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,6 +5,8 @@ include config.mk # Commands implemented as scripts SCRIPTS=cmd/yes +# Commands linking to another executable +SYMLINKS=cmd/'[' cmd/chgrp all: $(EXE) $(MAN1SO) @@ -45,11 +47,9 @@ clean: install: all mkdir -p ${DESTDIR}${BINDIR}/ - cp -p ${EXE} ${SCRIPTS} ${DESTDIR}${BINDIR}/ - ln -s test ${DESTDIR}${BINDIR}/'[' - ln -s chown ${DESTDIR}${BINDIR}/chgrp + cp -pP ${EXE} ${SCRIPTS} ${SYMLINKS} ${DESTDIR}${BINDIR}/ mkdir -p ${DESTDIR}${MANDIR}/man1 - cp -p ${MAN1} ${DESTDIR}${MANDIR}/man1 + cp -pP ${MAN1} ${DESTDIR}${MANDIR}/man1 .PHONY: coverage coverage: diff --git a/cmd/[ b/cmd/[ @@ -0,0 +1 @@ +test +\ No newline at end of file diff --git a/cmd/chgrp b/cmd/chgrp @@ -0,0 +1 @@ +chown +\ No newline at end of file