| Hash | Commit message | Author | Date | Files | + | - |
1 | commit ba4d574dd0d7246d96563498d95a347defef8cd4 |
2 | Author: Connor Etherington <[email protected]> |
3 | Date: Tue May 16 21:18:16 2023 +0200 |
4 | |
5 | Auto-Commit Update 16.05.2023 - 21:18:16 |
6 | --- |
7 | Makefile | 49 ++++++++++++++++++++++++++----------------------- |
8 | 1 file changed, 26 insertions(+), 23 deletions(-) |
9 | |
10 | diff --git a/Makefile b/Makefile |
11 | index 5611ac8..ac1b8bb 100644 |
12 | --- a/Makefile |
13 | +++ b/Makefile |
14 | @@ -35,38 +35,37 @@ all: info |
15 | |
16 | lfpreviewer: |
17 | @echo -e "\n\e[1;33m[+]\e[0m Installing ${PREVIEWER}...\n" |
18 | - rm -rf ${PREVIEWER}/build ${PREVIEWER}/${PREVIEWER}.egg-info ${PREVIEWER}/dist |
19 | - ${QUERY} ${PKGS} || ${INSTALL} ${PKGS} |
20 | - python3 -m pip install --upgrade pip |
21 | - python3 -m pip install --upgrade setuptools |
22 | - cd ${PREVIEWER} && python3 ./setup.py install && cd .. || true |
23 | + @rm -rf ${PREVIEWER}/build ${PREVIEWER}/${PREVIEWER}.egg-info ${PREVIEWER}/dist |
24 | + @${QUERY} ${PKGS} || ${INSTALL} ${PKGS} |
25 | + @python3 -m pip install --upgrade pip |
26 | + @python3 -m pip install --upgrade setuptools |
27 | + @cd ${PREVIEWER} && python3 ./setup.py install && cd .. || true |
28 | @which lfpreviewer >/dev/null 2>&1 || echo -e "\n\e[1;31m[-]\e[0m Please ensure you have sufficient premission to install ${PREVIEWER}." |
29 | |
30 | lfp: |
31 | @echo -e "\n\e[1;33m[+]\e[0m Installing ${PKG}...\n" |
32 | - install -Dm755 usr/bin/* -t "${PKGDIR}/usr/bin" || true |
33 | - install -Dm755 usr/share/${PKG}/{${PKG},${PKG}cd,cleaner,scope} -t "${PKGDIR}/usr/share/${PKG}" || true |
34 | - install -Dm644 usr/share/${PKG}/{${PKG}-icons,${PKG}rc} -t "${PKGDIR}/usr/share/${PKG}" || true |
35 | - install -Dm644 usr/share/licenses/${PKG}/LICENSE "${PKGDIR}/usr/share/licenses/${PKG}/LICENSE" || true |
36 | - install -Dm644 usr/share/doc/${PKG}/README.md "${PKGDIR}/usr/share/doc/${PKG}/README.md" || true |
37 | - install -Dm644 usr/share/man/man1/${PKG}.1.gz "${PKGDIR}/usr/share/man/man1/${PKG}.1.gz" || true |
38 | + @sudo install -Dm755 usr/bin/* -t "${PKGDIR}/usr/bin" || true |
39 | + @sudo install -Dm755 usr/share/${PKG}/{${PKG},${PKG}cd,cleaner,scope} -t "${PKGDIR}/usr/share/${PKG}" || true |
40 | + @sudo install -Dm644 usr/share/${PKG}/{${PKG}-icons,${PKG}rc} -t "${PKGDIR}/usr/share/${PKG}" || true |
41 | + @sudo install -Dm644 usr/share/licenses/${PKG}/LICENSE "${PKGDIR}/usr/share/licenses/${PKG}/LICENSE" || true |
42 | + @sudo install -Dm644 usr/share/doc/${PKG}/README.md "${PKGDIR}/usr/share/doc/${PKG}/README.md" || true |
43 | + @sudo install -Dm644 usr/share/man/man1/${PKG}.1.gz "${PKGDIR}/usr/share/man/man1/${PKG}.1.gz" || true |
44 | @[ ! -d /usr/share/lfp ] && echo -e "\n\e[1;31m[-]\e[0m Please ensure you have sufficient premission to install ${PKG}." || true |
45 | |
46 | install: lfpreviewer lfp cd-on-exit |
47 | |
48 | clean: |
49 | @echo -e "\n\e[1;33m[+]\e[0m Cleaning up..." |
50 | - rm -rf ${PKGDIR}/lib/python3.*/site-packages/${PREVIEWER}* |
51 | - rm -rf ${PKGDIR}/usr/bin/${PREVIEWER} |
52 | - rm -rf ${PKGDIR}/usr/share/${PKG} |
53 | - rm -rf ${PKGDIR}/usr/bin/${PKG} |
54 | - rm -rf ${PKGDIR}/usr/bin/${PKG}cd |
55 | - rm -rf ${PKGDIR}/usr/bin/cleaner |
56 | - rm -rf ${PKGDIR}/usr/bin/scope |
57 | - rm -rf ${PKGDIR}/usr/share/licenses/${PKG} |
58 | - rm -rf ${PKGDIR}/usr/share/doc/${PKG} |
59 | - rm -rf ${PKGDIR}/usr/share/man/man1/${PKG}.1.gz |
60 | - @echo -e "\n\e[1;32m[+]\e[0m lfp successfully uninstalled" |
61 | + @sudo rm -rf ${PKGDIR}/lib/python3.*/site-packages/${PREVIEWER}* |
62 | + @sudo rm -rf ${PKGDIR}/usr/bin/${PREVIEWER} |
63 | + @sudo rm -rf ${PKGDIR}/usr/share/${PKG} |
64 | + @sudo rm -rf ${PKGDIR}/usr/bin/${PKG} |
65 | + @sudo rm -rf ${PKGDIR}/usr/bin/${PKG}cd |
66 | + @sudo rm -rf ${PKGDIR}/usr/bin/cleaner |
67 | + @sudo rm -rf ${PKGDIR}/usr/bin/scope |
68 | + @sudo rm -rf ${PKGDIR}/usr/share/licenses/${PKG} |
69 | + @sudo rm -rf ${PKGDIR}/usr/share/doc/${PKG} |
70 | + @sudo rm -rf ${PKGDIR}/usr/share/man/man1/${PKG}.1.gz |
71 | |
72 | info: |
73 | @echo -e "\n\e[1;33m[*]\e[0m ${INFO}" |
74 | @@ -84,6 +83,10 @@ help: |
75 | cd-on-exit: |
76 | @[ -d /usr/share/lfp ] && echo -e "\n\n\033[1;32m[+]\e[0;1m For on-exit directory changing, add the following line to your bash/zshrc\e[0m :\e[36m\n\n source '/usr/share/lfp/lfpcd'\n\e[0m" || echo -e "\n\033[1;31m[!]\e[0;1m Installation Failed!" |
77 | |
78 | +uninstall: clean |
79 | + @echo -e "\n\e[1;32m[+]\e[0m ${PKG} successfully uninstalled" |
80 | |
81 | -.PHONY: info all lfpreviewer lfp install clean help cd-on-exit |
82 | +remove: uninstall |
83 | + |
84 | +.PHONY: info all lfpreviewer lfp install clean help cd-on-exit uninstall remove |
85 | |