From 4272b37d3d9f112b9f089dafc2e7538c4c24f7b2 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 9 Jun 2011 20:43:25 +1000 Subject: scripts: refactor output formatting functions Move the common output formatting functions into a separate library file and import that into each script. makepkg is excluded due to its additional color formatting. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/Makefile.am | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'scripts/Makefile.am') diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 5e8b57c4..1abf9c4c 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -25,6 +25,7 @@ EXTRA_DIST = \ $(LIBRARY) LIBRARY = \ + library/output_format.sh \ library/parse_options.sh # Files that should be removed, but which Automake does not know. @@ -69,13 +70,30 @@ $(OURSCRIPTS): Makefile @chmod a-w $@.tmp @mv $@.tmp $@ -makepkg: $(srcdir)/makepkg.sh.in $(srcdir)/library/parse_options.sh -pacman-db-upgrade: $(srcdir)/pacman-db-upgrade.sh.in -pacman-key: $(srcdir)/pacman-key.sh.in +makepkg: \ + $(srcdir)/makepkg.sh.in \ + $(srcdir)/library/parse_options.sh + +pacman-db-upgrade: \ + $(srcdir)/pacman-db-upgrade.sh.in \ + $(srcdir)/library/output_format.sh + +pacman-key: \ + $(srcdir)/pacman-key.sh.in \ + $(srcdir)/library/output_format.sh + pacman-optimize: $(srcdir)/pacman-optimize.sh.in -pkgdelta: $(srcdir)/pkgdelta.sh.in + +pkgdelta: \ + $(srcdir)/pkgdelta.sh.in \ + $(srcdir)/library/output_format.sh + rankmirrors: $(srcdir)/rankmirrors.sh.in -repo-add: $(srcdir)/repo-add.sh.in + +repo-add: \ + $(srcdir)/repo-add.sh.in \ + $(srcdir)/library/output_format.sh + repo-remove: $(srcdir)/repo-add.sh.in rm -f repo-remove $(LN_S) repo-add repo-remove -- cgit v1.2.3-24-g4f1b