Jiffy Installation

Install from Binary Distribution

At the moment, the easiest way to install Jiffy is to pull down the binary distribution matching your build environment from the latest release area in the jiffy repository. There you will find builds of the jiffy executable for the following GOOS and GOARCH combinations.

GOOS GOARCH FILE
darwin amd64 jiffy-darwin-amd64.tar.gz
linux amd64 jiffy-linux-amd64.tar.gz
linux arm jiffy-linux-arm.tar.gz
linux arm64 jiffy-linux-arm64.tar.gz
linux mips64 jiffy-linux-mips64.tar.gz
linux ppc64 jiffy-linux-ppc64.tar.gz
linux s390x jiffy-linux-s390x.tar.gz
freebsd amd64 jiffy-freebsd-amd64.tar.gz
freebsd arm jiffy-freebsd-arm.tar.gz
openbsd amd64 jiffy-openbsd-amd64.tar.gz
openbsd arm jiffy-openbsd-arm.tar.gz

This list is not exhaustive. If your GOOS/GOARCH are not found in this list, you may build jiffy from source by following the instructions in the next section.

Once downloaded, you may extract the ‘jiffy’ binary to a location anywhere in your $PATH, (/usr/local/bin is typical). Once the ‘jiffy’ binary has been moved to its new home, open a new terminal window and use the which command to ensure that the binary is in the $PATH.

    tar -xvf jiffy-linux-amd64.tar.gz
    mv jiffy /usr/local/bin
    which jiffy -a

If which cannot find the jiffy binary (or finds the wrong one!), make sure that your $PATH environment variable is set correctly, and maybe remove versions that were previously installed.


Install From Source Code

To install Jiffy from source use go get on the command-line to pull the latest version from github as shown below:


    go get -u github.com/1414C/jiffy

The go get command will pull the master branch of the Jiffy github repository into your $GOPATH/src/github.com folder, as well as any dependencies referenced by the Jiffy source code. The -u flag is included to instruct go get to check for and pull updates to Jiffy packages and their dependencies based on the content of the project’s go.mod file.

Once the Jiffy source code and dependencies have been installed into the $GOPATH, make can be used to compile a binary from the Jiffy sources and install it in /usr/local/bin. Open a terminal window, switch to $GOPATH/src/github.com/1414C/jiffy and run make install-mac or make install-linux as shown below. make install-mac and make install-linux both build for a GOARCH=amd64. If you need to build for another architecture, edit the Makefile accordingly. Check the all section of the Makefile; you can probably just copy one of the existing entries as these are used to generate the binary_distributions tree.


    make install-mac  or
    make install-linux

This will result in the creation of a binary file named ‘jiffy’ and its subsequent installation in /usr/local/bin. You may move the ‘jiffy’ binary anywhere in your $PATH, but for now /usr/local/bin will be fine. Once the ‘jiffy’ binary has been moved to its new home, open a new terminal window and use the which command to ensure that the binary is in the $PATH.


    which jiffy -a

If which cannot find the jiffy binary (or finds the wrong one!), make sure that your $PATH environment variable is set correctly, and maybe remove versions that were previously installed. Alternatively, Jiffy can be run directly from the source via ‘go run main.go … …'.