sdep

A simple "date+event" line parser
git clone https://git.tronto.net/sdep
Download | Log | Files | Refs | README | LICENSE

commit 9902b66c098b51ac91785eb5d929a73b981ce08c
parent 9c885d3172da1865df9db8f07a607a23eb26a80f
Author: Sebastiano Tronto <sebastiano.tronto@gmail.com>
Date:   Thu, 10 Jun 2021 18:45:56 +0200

Changed scripts make target

Diffstat:
MMakefile | 23+++++++++++++++--------
MREADME.md | 4++--
2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -4,7 +4,7 @@ VERSION = 0.1 PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man -SDEPDATA = ${XDG_DATA_HOME}/sdep +SDEPDATA = ${HOME}/.local/share/sdep SCRIPTS = sdep-add sdep-checknow sdep-clear sdep-edit sdep-list CPPFLAGS = -D_XOPEN_SOURCE=700 -DVERSION=\"${VERSION}\" @@ -21,10 +21,10 @@ options: @echo "CC = ${CC}" sdep: - ${CC} ${CFLAGS} -o sdep sdep.c + ${CC} ${CFLAGS} -o sdep.o sdep.c clean: - rm -f sdep sdep-${VERSION}.tar.gz + rm -rf sdep.o sdep-${VERSION}.tar.gz scripts-build dist: clean mkdir -p sdep-${VERSION} @@ -35,17 +35,24 @@ dist: clean install: all mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f sdep ${DESTDIR}${PREFIX}/bin + cp -f sdep.o ${DESTDIR}${PREFIX}/bin/sdep chmod 755 ${DESTDIR}${PREFIX}/bin/sdep mkdir -p ${DESTDIR}${MANPREFIX}/man1 - sed "s/VERSION/${VERSION}/g" < sdep.1 > ${DESTDIR}${MANPREFIX}/man1/sdep.1 + sed "s/VERSION/${VERSION}/g" < sdep.1 \ + > ${DESTDIR}${MANPREFIX}/man1/sdep.1 chmod 644 ${DESTDIR}${MANPREFIX}/man1/sdep.1 scripts: - mkdir -p ${DESTDIR}${SDEPDATA} + mkdir -p scripts-build + mkdir -p ${SDEPDATA} for s in ${SCRIPTS}; do\ - sed "s|SDEPDATA|${DESTDIR}${SDEPDATA}|g" < scripts/$$s \ - > ${DESTDIR}${PREFIX}/bin/$$s ;\ + sed "s|SDEPDATA|${SDEPDATA}|g" < scripts/$$s \ + > scripts-build/$$s ;\ + done + +scriptsinstall: + for s in ${SCRIPTS}; do\ + cp -f scripts-build/$$s ${DESTDIR}${PREFIX}/bin ; \ chmod 755 ${DESTDIR}${PREFIX}/bin/$$s ;\ done diff --git a/README.md b/README.md @@ -88,8 +88,8 @@ between multiple devices using something like The `scripts` folder contains the few scripts that I use. They are basically just a more elaborate version of the calendar system described above, with support for recurring events (e.g. weekly, daily). You can install them -with `make scripts`, but first make sure to adjust them to match your local -configuration. +with `make scripts` and then `make scriptsinstall`, but first make sure to +adjust them to match your local configuration. For example check that the folder SDEPDATA in Makefile suits you. Most of the scripts rely on the `-d` option of the GNU date utility, so you