From 6efbd24c58cf9bd7b64e321da2feedb474014fa6 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Thu, 22 Feb 2018 13:46:42 -0500 Subject: [PATCH] Improve installation instructions (#244) * Clarify manual-install -> symlinks-install --- Makefile | 24 ++++++++++++++++-------- README.md | 9 +++++---- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 2c3c14c..7c46181 100644 --- a/Makefile +++ b/Makefile @@ -6,15 +6,18 @@ OUTPUTDIR?="$(BASEDIR)/debbuild-${PKGNAME}" all: @echo 'Menu:' - @echo ' make update Update any generated files' - @echo ' make packages Make RPM packages' - @echo ' make packages-deb Make DEB packages' - @echo ' make test Run tests' - @echo ' make install (incomplete)' + @echo ' make update Update any generated files' + @echo ' make packages-rpm Make RPM packages' + @echo ' make packages-deb Make DEB packages' + @echo ' make symlinks-install Make symlinks in /usr/local/bin/' + @echo ' make copy-install Copy "bin" files to /usr/local/bin/' + @echo ' make usrlocal-uninstall Remove blackbox files from /usr/local/bin/' + @echo ' make test Run tests' install: @echo 'To install, copy the files from bin to somewhere in your PATH.' - @echo 'Or, if you use RPMs, "make packages" and install the result.' + @echo 'The README.md document gives more details.' + @echo 'Or run "make" (with no options) for more info.' # The default package type is RPM. packages: packages-rpm @@ -51,12 +54,17 @@ unlock-rpm: # # Manual install # -manual-install: +symlinks-install: @echo 'Symlinking files from ./bin to /usr/local/bin' @cd bin && for f in `find . -type f -iname "*" ! -iname "Makefile"`; do ln -fs `pwd`/$$f /usr/local/bin/$$f; done @echo 'Done.' -manual-uninstall: +copy-install: + @echo 'Copying files from ./bin to /usr/local/bin' + @cd bin && for f in `find . -type f -iname "*" ! -iname "Makefile"`; do cp `pwd`/$$f /usr/local/bin/$$f; done + @echo 'Done.' + +usrlocal-uninstall: @echo 'Removing blackbox files from /usr/local/bin' @cd bin && for f in `find . -type f -iname "*" ! -iname "Makefile"`; do rm /usr/local/bin/$$f; done @echo 'Done.' diff --git a/README.md b/README.md index d1ac026..0318959 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,13 @@ The ability to be open and transparent about our code, with the exception of a f Installation Instructions ========================= +- *The hard way (manual*: Copy all the files in "bin" to your "bin". +- *The hard way (automatic)*: `make copy-install` will copy the bin files into /usr/local/bin (uninstall with `make usrlocal-uninstall`). +- *The symlinks way*: `make synlinks-install` will make symlinks of the bin files into /usr/local/bin (uninstall with `make usrlocal-uninstall`) (useful when doing development) - *The MacPorts Way*: `sudo port install vcs_blackbox` - *The Homebrew Way*: `brew install blackbox` -- *The RPM way*: Check out the repo and make an RPM via `make packages-rpm`; now you can distribute the RPM via local methods. -- *The Debian/Ubuntu way*: Check out the repo and install [fpm](https://github.com/jordansissel/fpm). Now you can make a DEB `make packages-deb` that can be distributed via local methods. -- *The hard way*: Copy all the files in "bin" to your "bin". -- *The manual way*: `make manual-install` to install. `make manual-uninstall` to uninstall. +- *The RPM way*: Check out the repo and make an RPM via `make packages-rpm`; now you can distribute the RPM via local methods. (Requires [fpm](https://github.com/jordansissel/fpm).) +- *The Debian/Ubuntu way*: Check out the repo and make a DEB via `make packages-deb`; now you can distribute the DEB via local methods. (Requires [fpm](https://github.com/jordansissel/fpm).) - *The Antigen Way*: Add `antigen bundle StackExchange/blackbox` to your .zshrc - *The Zgen Way*: Add `zgen load StackExchange/blackbox` to your .zshrc where you're loading your other plugins.