summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-06-14 11:29:29 -0500
committerDan McGee <dan@archlinux.org>2008-06-14 11:31:18 -0500
commita1dfa8e61f385a6b388b66f4860e96a62f3edae6 (patch)
treece8e6e3f3cb584dfc582754b5f121abb146a8157 /scripts/Makefile.am
parent89819b3f9268062ee54c35a16876474414d94bf5 (diff)
downloadpacman-a1dfa8e61f385a6b388b66f4860e96a62f3edae6.tar.xz
Combine repo-add and repo-remove into one script
They shared about 75% of their code, so there is no real reason we should maintain them separately. Merge the differences accordingly and add a check based on the basename of the command used to decide what behavior to follow. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/Makefile.am')
-rw-r--r--scripts/Makefile.am16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index e6c051b0..283556e3 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -2,18 +2,20 @@
AUTOMAKE_OPTIONS = std-options
bin_SCRIPTS = \
+ $(OURSCRIPTS) \
+ repo-remove
+
+OURSCRIPTS = \
makepkg \
pacman-optimize \
rankmirrors \
- repo-add \
- repo-remove
+ repo-add
EXTRA_DIST = \
makepkg.sh.in \
pacman-optimize.sh.in \
rankmirrors.py.in \
- repo-add.sh.in \
- repo-remove.sh.in
+ repo-add.sh.in
# Files that should be removed, but which Automake does not know.
MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp
@@ -42,7 +44,7 @@ edit = sed \
## 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
+$(OURSCRIPTS): Makefile
rm -f $@ $@.tmp
test -f $(srcdir)/$@.sh.in && $(edit) $(srcdir)/$@.sh.in >$@.tmp || true
test -f $(srcdir)/$@.py.in && $(edit) $(srcdir)/$@.py.in >$@.tmp || true
@@ -55,7 +57,7 @@ makepkg: $(srcdir)/makepkg.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
+repo-remove: $(srcdir)/repo-add.sh.in
+ ln -s repo-add repo-remove
# vim:set ts=2 sw=2 noet: