Install shell script - rocky/emacs-test-simple GitHub Wiki

There is a shell script to install this package and its prerequisites. If you are lucky you can just run this:

bash ./install-from-git.sh

However we do provide for some customization:

git protocol

If your git clone can't handle the http protocol, might be able to use the git protocol. To do this, set the GIT_PROTOCOL variable like this:

 GIT_PROTOCOL=git sh ./install-from-git.sh

configure options (e.g --prefix)

If you want to customize configuration parameters, for example, choose where to install, you can pass configure options to this script. For example:

 bash ./install-from-git.sh --prefix=/tmp

To "sudo" or not to "sudo"?

If you are running as root on a *Nix-like box, then there's no problem.

If you are not running as root, "sudo" might be invoked to install code. On systems that don't have a "sudo" command but need filesystem permission, then you get by with setting SUDO_CMD to "su root-c" For example:

SUDO_CMD='su root -c' sh ./install-from-git.sh

If you have sufficient filesystem permission (which is often the case on Windows or cygwin) then you might not need or want sudo. So here, set SUDO_CMD to a blank:

SUDO_CMD=' ' sh ./install-from-git.sh

To finish, here is an invocation using all 3 above options:

GIT_PROTOCOL='git' SUDO_CMD=' ' sh ./install-from-git.sh --prefix=/tmp