mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Update makefile to not try to delete old config files during install, and instead fail with a relevant error message. Thanks to Jamessan for pointing out the evilness of the old method and suggesting the new method.
darcs-hash:20061025163532-ac50b-ff394c53b8eb0d932894784bc25e086f9c9b65ec.gz
This commit is contained in:
parent
4f22082a5c
commit
c684b7c7c7
1 changed files with 27 additions and 16 deletions
43
Makefile.in
43
Makefile.in
|
@ -382,13 +382,24 @@ check-uninstall:
|
||||||
echo ERROR;\
|
echo ERROR;\
|
||||||
echo;\
|
echo;\
|
||||||
echo An older fish installation using an incompatible filesystem hierarchy was detected;\
|
echo An older fish installation using an incompatible filesystem hierarchy was detected;\
|
||||||
echo You must uninstall this fish version before installing proceeding;\
|
echo You must uninstall this fish version before proceeding;\
|
||||||
echo type \'make uninstall-legacy\' to uninstall these files,;\
|
echo type \'make uninstall-legacy\' to uninstall these files,;\
|
||||||
echo or type \'make force-install\' to force installation.;\
|
echo or type \'make force-install\' to force installation.;\
|
||||||
echo The latter may result in a broken installation.;\
|
echo The latter may result in a broken installation.;\
|
||||||
echo;\
|
echo;\
|
||||||
false;\
|
false;\
|
||||||
fi;
|
fi;
|
||||||
|
if test -f $(DESTDIR)$(sysconfdir)/fish; then \
|
||||||
|
echo;\
|
||||||
|
echo ERROR;\
|
||||||
|
echo;\
|
||||||
|
echo An older fish installation using an incompatible filesystem hierarchy was detected;\
|
||||||
|
echo You must remove the file $(DESTDIR)$(sysconfdir)/fish before proceeding;\
|
||||||
|
echo type \'make uninstall-legacy\' to uninstall this file,;\
|
||||||
|
echo or remove it manually using \'rm $(DESTDIR)$(sysconfdir)/fish\'.;\
|
||||||
|
echo;\
|
||||||
|
false;\
|
||||||
|
fi;
|
||||||
.PHONY: check-uninstall
|
.PHONY: check-uninstall
|
||||||
|
|
||||||
install-sh:
|
install-sh:
|
||||||
|
@ -406,7 +417,6 @@ install-force: all install-translations
|
||||||
for i in $(PROGRAMS); do\
|
for i in $(PROGRAMS); do\
|
||||||
$(INSTALL) -m 755 $$i $(DESTDIR)$(bindir) ; \
|
$(INSTALL) -m 755 $$i $(DESTDIR)$(bindir) ; \
|
||||||
done;
|
done;
|
||||||
rm $(DESTDIR)$(sysconfdir)/fish; true
|
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/fish
|
$(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/fish
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish
|
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish
|
||||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions
|
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions
|
||||||
|
@ -445,20 +455,20 @@ install-force: all install-translations
|
||||||
# Uninstall this fish version
|
# Uninstall this fish version
|
||||||
|
|
||||||
uninstall: uninstall-translations
|
uninstall: uninstall-translations
|
||||||
for i in $(PROGRAMS); do \
|
-for i in $(PROGRAMS); do \
|
||||||
rm -f $(DESTDIR)$(bindir)/$$i; \
|
rm -f $(DESTDIR)$(bindir)/$$i; \
|
||||||
done;
|
done;
|
||||||
rm -f $(DESTDIR)$(bindir)/xsel
|
-rm -f $(DESTDIR)$(bindir)/xsel
|
||||||
rm -f $(DESTDIR)$(sysconfdir)/fish/config.fish
|
-rm -f $(DESTDIR)$(sysconfdir)/fish/config.fish
|
||||||
rm -f $(DESTDIR)$(sysconfdir)/fish/fish_inputrc
|
-rm -f $(DESTDIR)$(sysconfdir)/fish/fish_inputrc
|
||||||
rmdir $(DESTDIR)$(sysconfdir)/fish; true
|
-rmdir $(DESTDIR)$(sysconfdir)/fish
|
||||||
if test -d $(DESTDIR)$(datadir)/fish; then \
|
-if test -d $(DESTDIR)$(datadir)/fish; then \
|
||||||
rm -r $(DESTDIR)$(datadir)/fish; \
|
rm -r $(DESTDIR)$(datadir)/fish; \
|
||||||
fi
|
fi
|
||||||
if test -d $(DESTDIR)$(docdir); then \
|
-if test -d $(DESTDIR)$(docdir); then \
|
||||||
rm -r $(DESTDIR)$(docdir);\
|
rm -r $(DESTDIR)$(docdir);\
|
||||||
fi
|
fi
|
||||||
for i in $(MANUALS); do \
|
-for i in $(MANUALS); do \
|
||||||
rm -f $(DESTDIR)$(mandir)/man1/`basename $$i`*; \
|
rm -f $(DESTDIR)$(mandir)/man1/`basename $$i`*; \
|
||||||
done;
|
done;
|
||||||
.PHONY: uninstall
|
.PHONY: uninstall
|
||||||
|
@ -468,10 +478,10 @@ uninstall: uninstall-translations
|
||||||
# the sysadmin.
|
# the sysadmin.
|
||||||
|
|
||||||
uninstall-legacy: uninstall
|
uninstall-legacy: uninstall
|
||||||
rm -f $(DESTDIR)$(sysconfdir)/fish.d/fish_interactive.fish
|
-rm -f $(DESTDIR)$(sysconfdir)/fish.d/fish_interactive.fish
|
||||||
rm -f $(DESTDIR)$(sysconfdir)/fish.d/fish_complete.fish
|
-rm -f $(DESTDIR)$(sysconfdir)/fish.d/fish_complete.fish
|
||||||
rm -f $(DESTDIR)$(sysconfdir)/fish.d/fish_function.fish
|
-rm -f $(DESTDIR)$(sysconfdir)/fish.d/fish_function.fish
|
||||||
if test -d $(DESTDIR)$(sysconfdir)/fish.d/completions; then \
|
-if test -d $(DESTDIR)$(sysconfdir)/fish.d/completions; then \
|
||||||
for i in $(COMPLETIONS_DIR_FILES); do \
|
for i in $(COMPLETIONS_DIR_FILES); do \
|
||||||
basename=`basename $$i`; \
|
basename=`basename $$i`; \
|
||||||
if test -f $(DESTDIR)$(sysconfdir)/fish.d/completions/$$basename; then \
|
if test -f $(DESTDIR)$(sysconfdir)/fish.d/completions/$$basename; then \
|
||||||
|
@ -479,8 +489,9 @@ uninstall-legacy: uninstall
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
fi;
|
fi;
|
||||||
rmdir $(DESTDIR)$(sysconfdir)/fish.d/completions; true
|
-rmdir $(DESTDIR)$(sysconfdir)/fish.d/completions
|
||||||
rmdir $(DESTDIR)$(sysconfdir)/fish.d; true
|
-rmdir $(DESTDIR)$(sysconfdir)/fish.d
|
||||||
|
-rm $(DESTDIR)$(sysconfdir)/fish
|
||||||
@echo The previous fish installation has been removed.
|
@echo The previous fish installation has been removed.
|
||||||
.PHONY: uninstall-legacy
|
.PHONY: uninstall-legacy
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue