stagit

Personal stagit fork
git clone git://git.alexwennerberg.com/stagit
Log | Files | Refs | README | LICENSE

commit b0d3a4f50b346f540db0fd3f20c30bd78344eb2a
parent 06b73aa8f76fe73d27eaca98e6e814428b0eac09
Author: Armaan Bhojwani <me@armaanb.net>
Date:   Mon,  8 Mar 2021 09:39:49 -0500

Restructure repo

Diffstat:
MMakefile | 60+++++++++++++++++++++++++-----------------------------------
Rexample_create.sh -> contrib/example_create.sh | 0
Rexample_post-receive.sh -> contrib/example_post-receive.sh | 0
Rrepo-gen.sh -> contrib/repo-gen.sh | 0
Rstagit-index.1 -> man/stagit-index.1 | 0
Rstagit.1 -> man/stagit.1 | 0
Rfavicon.png -> resources/favicon.png | 0
Rlogo.png -> resources/logo.png | 0
Rstyle.css -> resources/style.css | 0
Rstyle.min.css -> resources/style.min.css | 0
Rsyntax.css -> resources/syntax.css | 0
Rcompat.h -> src/compat.h | 0
Rhighlight.py -> src/highlight.py | 0
Rreallocarray.c -> src/reallocarray.c | 0
Rstagit-index.c -> src/stagit-index.c | 0
Rstagit.c -> src/stagit.c | 0
Rstrlcat.c -> src/strlcat.c | 0
Rstrlcpy.c -> src/strlcpy.c | 0
18 files changed, 25 insertions(+), 35 deletions(-)

diff --git a/Makefile b/Makefile @@ -18,27 +18,27 @@ STAGIT_LDFLAGS = ${LIBGIT_LIB} ${LDFLAGS} STAGIT_CPPFLAGS = -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE SRC = \ - stagit.c\ - stagit-index.c + src/stagit.c\ + src/stagit-index.c COMPATSRC = \ - reallocarray.c\ - strlcat.c\ - strlcpy.c + src/reallocarray.c\ + src/strlcat.c\ + src/strlcpy.c BIN = \ stagit\ stagit-index MAN1 = \ - stagit.1\ - stagit-index.1 + man/stagit.1\ + man/stagit-index.1 DOC = \ LICENSE\ README -HDR = compat.h +HDR = src/compat.h COMPATOBJ = \ - reallocarray.o\ - strlcat.o\ - strlcpy.o + src/reallocarray.o\ + src/strlcat.o\ + src/strlcpy.o OBJ = ${SRC:.c=.o} ${COMPATOBJ} @@ -54,8 +54,7 @@ dist: rm -rf ${NAME}-${VERSION} mkdir -p ${NAME}-${VERSION} cp -f ${MAN1} ${HDR} ${SRC} ${COMPATSRC} ${DOC} \ - Makefile favicon.png logo.png style.min.css syntax.css highlight.py \ - example_create.sh example_post-receive.sh \ + Makefile resources/* src/highlight.py contrib/* \ ${NAME}-${VERSION} # make tarball tar -cf - ${NAME}-${VERSION} | \ @@ -64,12 +63,12 @@ dist: ${OBJ}: ${HDR} -stagit: stagit.o ${COMPATOBJ} requirements.txt +stagit: src/stagit.o ${COMPATOBJ} requirements.txt pip3 install -r requirements.txt - ${CC} -o $@ stagit.o ${COMPATOBJ} ${STAGIT_LDFLAGS} + ${CC} -o $@ src/stagit.o ${COMPATOBJ} ${STAGIT_LDFLAGS} -stagit-index: stagit-index.o ${COMPATOBJ} - ${CC} -o $@ stagit-index.o ${COMPATOBJ} ${STAGIT_LDFLAGS} +stagit-index: src/stagit-index.o ${COMPATOBJ} + ${CC} -o $@ src/stagit-index.o ${COMPATOBJ} ${STAGIT_LDFLAGS} clean: rm -f ${BIN} ${OBJ} ${NAME}-${VERSION}.tar.gz @@ -81,36 +80,27 @@ install: all for f in ${BIN}; do chmod 755 ${DESTDIR}${PREFIX}/bin/$$f; done # installing example files. mkdir -p ${DESTDIR}${DOCPREFIX} - cp -f favicon.png\ - logo.png\ - example_create.sh\ - example_post-receive.sh\ + cp -f resources/*.png\ + contrib/*\ README\ ${DESTDIR}${DOCPREFIX} mkdir -p ${DESTDIR}${SHAREPREFIX} - cp -f style.min.css\ - syntax.css\ - highlight.py\ + cp -f resources/*\ + src/highlight.py\ ${DESTDIR}${SHAREPREFIX} # installing manual pages. mkdir -p ${DESTDIR}${MANPREFIX}/man1 cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1 - for m in ${MAN1}; do chmod 644 ${DESTDIR}${MANPREFIX}/man1/$$m; done + install -Dm644 man/* ${DESTDIR}${MANPREFIX}/man1 uninstall: # removing executable files. for f in ${BIN}; do rm -f ${DESTDIR}${PREFIX}/bin/$$f; done # removing example files. - rm -f \ - ${DESTDIR}${SHAREPREFIX}/style.min.css\ - ${DESTDIR}${SHAREPREFIX}/syntax.css\ - ${DESTDIR}${SHAREPREFIX}/highlight.py\ - ${DESTDIR}${DOCPREFIX}/favicon.png\ - ${DESTDIR}${DOCPREFIX}/logo.png\ - ${DESTDIR}${DOCPREFIX}/example_create.sh\ - ${DESTDIR}${DOCPREFIX}/example_post-receive.sh\ - ${DESTDIR}${DOCPREFIX}/README - -rmdir ${DESTDIR}${DOCPREFIX} + rm -f ${DESTDIR}${SHAREPREFIX}/* + rm -f ${DESTDIR}${DOCPREFIX}/* + rmdir ${DESTDIR}${SHAREPREFIX} + rmdir ${DESTDIR}${DOCPREFIX} # removing manual pages. for m in ${MAN1}; do rm -f ${DESTDIR}${MANPREFIX}/man1/$$m; done diff --git a/example_create.sh b/contrib/example_create.sh diff --git a/example_post-receive.sh b/contrib/example_post-receive.sh diff --git a/repo-gen.sh b/contrib/repo-gen.sh diff --git a/stagit-index.1 b/man/stagit-index.1 diff --git a/stagit.1 b/man/stagit.1 diff --git a/favicon.png b/resources/favicon.png Binary files differ. diff --git a/logo.png b/resources/logo.png Binary files differ. diff --git a/style.css b/resources/style.css diff --git a/style.min.css b/resources/style.min.css diff --git a/syntax.css b/resources/syntax.css diff --git a/compat.h b/src/compat.h diff --git a/highlight.py b/src/highlight.py diff --git a/reallocarray.c b/src/reallocarray.c diff --git a/stagit-index.c b/src/stagit-index.c diff --git a/stagit.c b/src/stagit.c diff --git a/strlcat.c b/src/strlcat.c diff --git a/strlcpy.c b/src/strlcpy.c