From 5f77f1b151332028dd194110b8d06c24354950c7 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 30 Jan 2016 21:18:30 +1100 Subject: [PATCH] Added makefile for easy install/uninstall --- 1.1.md | 7 +++++++ Makefile | 21 +++++++++++++++++++++ README.md | 10 ++++++---- 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/1.1.md b/1.1.md index 1d3c4eb6..91ebe072 100644 --- a/1.1.md +++ b/1.1.md @@ -18,6 +18,13 @@ keep between script versions! at launch or in script. +### Makefile + +- Fetch now has a make file due to the increasing number of files,
+this allows the script to be easily installed and uninstalled on
+systems it isn't packaged for yet! + + ### Info **Kernel:** diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..f085517b --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +PREFIX ?= usr +RM ?= rm -f +INSTALL_DIR ?= install -m755 -d +INSTALL_PROG ?= install -m755 -D +INSTALL_FILE ?= install -m644 -D + +all: + @echo Run \'make install\' to install Fetch + +install: + $(INSTALL_DIR) $(DESTDIR)/$(PREFIX)/bin + $(INSTALL_DIR) $(DESTDIR)/usr/share/fetch/ascii/distro + $(INSTALL_PROG) fetch $(DESTDIR)/$(PREFIX)/bin/fetch + $(INSTALL_PROG) config $(DESTDIR)/usr/share/fetch/config + $(INSTALL_PROG) ascii/distro/* $(DESTDIR)/usr/share/fetch/ascii/distro + +uninstall: + $(RM) $(DESTDIR)/$(PREFIX)/bin/fetch + $(RM) -r $(DESTDIR)/usr/share/fetch + + diff --git a/README.md b/README.md index 8e25ea65..4f356770 100644 --- a/README.md +++ b/README.md @@ -108,10 +108,12 @@ your distro's logo or any ascii art of your choice! ### Others 1. Download the latest source at https://github.com/dylanaraps/fetch -2. Make the file executable using chmod. `chmod +x /path/to/fetch` -3. Symlink `fetch` to somehwere in your `$PATH`. `ln -s /path/to/fetch /path/to/$PATH` - - Fetch now comes with ascii art and a config file so moving
- just the script file will disable these features. +2. Run `make install` inside the script directory to install the script. + +**NOTE:** Fetch can be uninstalled easily using `make uninstall`. + +**NOTE:** Fetch can also be run from any directory like a normal script,
+you'll just be missing the ascii distro logos and config file functionality.