From b5f8a44bebc906bf6a29d30c159802b0c1a7dbb1 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 6 Jul 2007 18:43:24 -0400 Subject: Move scripts from *.in to *.sh.in so gettext can determine type If we move the scripts from *.in to *.sh.in and *.py.in, gettext can pull the required strings to translate a whole lot easier. Do this. Signed-off-by: Dan McGee --- scripts/Makefile.am | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'scripts/Makefile.am') diff --git a/scripts/Makefile.am b/scripts/Makefile.am index ba392fa9..01250f5b 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -16,15 +16,15 @@ bin_SCRIPTS += abs endif EXTRA_DIST = \ - abs.in \ - gensync.in \ - makepkg.in \ - makeworld.in \ - pacman-optimize.in \ - rankmirrors.in \ - repo-add.in \ - repo-remove.in \ - updatesync.in + abs.sh.in \ + gensync.sh.in \ + makepkg.sh.in \ + makeworld.sh.in \ + pacman-optimize.sh.in \ + rankmirrors.py.in \ + repo-add.sh.in \ + repo-remove.sh.in \ + updatesync.sh.in # Files that should be removed, but which Automake does not know. MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp @@ -43,22 +43,26 @@ edit = sed \ ## All the scripts depend on Makefile so that they are rebuilt when the ## prefix etc. changes. Use chmod -w to prevent people from editing the ## wrong file by accident. +# two 'test' lines- make sure we can handle both sh and py type scripts +# third 'test' line- make sure one of the two checks succeeded $(bin_SCRIPTS): Makefile rm -f $@ $@.tmp - $(edit) `test -f ./$@.in || echo $(srcdir)/`$@.in >$@.tmp + test -f $(srcdir)/$@.sh.in && $(edit) $(srcdir)/$@.sh.in >$@.tmp || true + test -f $(srcdir)/$@.py.in && $(edit) $(srcdir)/$@.py.in >$@.tmp || true + test -f $@.tmp || false chmod +x $@.tmp chmod a-w $@.tmp mv $@.tmp $@ -abs: $(srcdir)/abs.in -gensync: $(srcdir)/gensync.in -makepkg: $(srcdir)/makepkg.in -makeworld: $(srcdir)/makeworld.in -pacman-optimize: $(srcdir)/pacman-optimize.in -rankmirrors: $(srcdir)/rankmirrors.in -repo-add: $(srcdir)/repo-add.in -repo-remove: $(srcdir)/repo-remove.in -re-pacman: $(srcdir)/re-pacman.in -updatesync: $(srcdir)/updatesync.in +abs: $(srcdir)/abs.sh.in +gensync: $(srcdir)/gensync.sh.in +makepkg: $(srcdir)/makepkg.sh.in +makeworld: $(srcdir)/makeworld.sh.in +pacman-optimize: $(srcdir)/pacman-optimize.sh.in +rankmirrors: $(srcdir)/rankmirrors.py.in +repo-add: $(srcdir)/repo-add.sh.in +repo-remove: $(srcdir)/repo-remove.sh.in +re-pacman: $(srcdir)/re-pacman.sh.in +updatesync: $(srcdir)/updatesync.sh.in # vim:set ts=2 sw=2 noet: -- cgit v1.2.3-24-g4f1b