Added makefile for easy install/uninstall

This commit is contained in:
Dylan 2016-01-30 21:18:30 +11:00
parent eac81f3b48
commit 5f77f1b151
3 changed files with 34 additions and 4 deletions

7
1.1.md
View File

@ -18,6 +18,13 @@ keep between script versions!
at launch or in script. at launch or in script.
### Makefile
- Fetch now has a make file due to the increasing number of files,<br \>
this allows the script to be easily installed and uninstalled on<br \>
systems it isn't packaged for yet!
### Info ### Info
**Kernel:** **Kernel:**

21
Makefile Normal file
View File

@ -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

View File

@ -108,10 +108,12 @@ your distro's logo or any ascii art of your choice!
### Others ### Others
1. Download the latest source at https://github.com/dylanaraps/fetch 1. Download the latest source at https://github.com/dylanaraps/fetch
2. Make the file executable using chmod. `chmod +x /path/to/fetch` 2. Run `make install` inside the script directory to install the script.
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<br \> **NOTE:** Fetch can be uninstalled easily using `make uninstall`.
just the script file will disable these features.
**NOTE:** Fetch can also be run from any directory like a normal script,<br \>
you'll just be missing the ascii distro logos and config file functionality.
<!-- }}} --> <!-- }}} -->