Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sage
Path: blob/develop/build/pkgs/cocoalib/patches/overwrite_install.patch
7388 views
1
Simply overwrite an existing installation without asking questions
2
3
diff -ru a/Makefile b/Makefile
4
--- a/Makefile 2017-11-21 13:35:13.000000000 +0100
5
+++ b/Makefile 2018-06-29 19:48:19.654035809 +0200
6
@@ -22,9 +22,6 @@
7
@echo ">>> WARNING CoCoALib installation procedure is still experimental! <<<"
8
@echo "======================================================================="
9
@echo
10
- @echo "Continuing with installation after 5 secs..."
11
- @echo
12
- @sleep 5
13
@if [ \! -f lib/libcocoa.a ]; \
14
then \
15
echo "***** INSTALLATION ERROR: CoCoALib is not built! *****"; \
16
@@ -54,25 +51,6 @@
17
echo "***** >>>> Consider using \`sudo' command <<<<"; \
18
exit 1; \
19
fi
20
- @if [ -e "$(COCOALIB_INSTALL_DIR)/include/CoCoA" -a \! -L "$(COCOALIB_INSTALL_DIR)/include/CoCoA" ]; \
21
- then \
22
- echo; \
23
- echo "***** ERROR: $(COCOALIB_INSTALL_DIR)/include/CoCoA exists but is not a symlink *****"; \
24
- echo "***** >>>> Please remove it or rename it before installing CoCoALib <<<<"; \
25
- exit 2; \
26
- fi
27
- @if [ -e "$(COCOALIB_INSTALL_DIR)/lib/libcocoa.a" -a \! -f "$(COCOALIB_INSTALL_DIR)/lib/libcocoa.a" ]; \
28
- then \
29
- echo; \
30
- echo "***** ERROR: $(COCOALIB_INSTALL_DIR)/lib/libcocoa.a exists but is not a symlink *****"; \
31
- echo "***** >>>> Please remove it or rename it before installing CoCoALib <<<<"; \
32
- exit 2; \
33
- fi
34
- @if [ -e "$(COCOALIB_INSTALL_DIR)/include/CoCoA-$(VERSION)" ]; \
35
- then \
36
- read -p "Really overwrite existing installation? " yn; \
37
- if [ "X$$yn" \!= "Xy" -a "X$$yn" \!= "Xyes" ]; then exit 3; fi; \
38
- fi
39
@/bin/rm -rf "$(COCOALIB_INSTALL_DIR)/include/CoCoA-$(VERSION)"
40
@/bin/mkdir -p "$(COCOALIB_INSTALL_DIR)/include/CoCoA-$(VERSION)"
41
@$(INSTALL_CMD) -m 644 include/CoCoA/*.H "$(COCOALIB_INSTALL_DIR)/include/CoCoA-$(VERSION)"
42
@@ -88,7 +66,7 @@
43
@$(INSTALL_CMD) -m 644 doc/html/*.html "$(COCOALIB_INSTALL_DIR)/include/CoCoA-$(VERSION)/doc/html"
44
@$(INSTALL_CMD) -m 644 doc/html/cocoalib-doc.css "$(COCOALIB_INSTALL_DIR)/include/CoCoA-$(VERSION)/doc/html"
45
@echo "Installed CoCoA documentation in \"$(COCOALIB_INSTALL_DIR)/include/CoCoA/doc/\""
46
- @/bin/rm -f "$(COCOALIB_INSTALL_DIR)/include/CoCoA"
47
+ @/bin/rm -rf "$(COCOALIB_INSTALL_DIR)/include/CoCoA"
48
@/bin/ln -s "$(COCOALIB_INSTALL_DIR)/include/CoCoA-$(VERSION)" "$(COCOALIB_INSTALL_DIR)/include/CoCoA"
49
@echo "Installed CoCoA headers in \"$(COCOALIB_INSTALL_DIR)/include/CoCoA/\""
50
@/bin/rm -f "$(COCOALIB_INSTALL_DIR)/lib/libcocoa-$(VERSION).a"
51
52