tape setup

Usage

powershell
.\tape.exe setup             # put this tape on your PATH
.\tape.exe setup --remove    # take it off again

Purpose

After you extract a tape release, tape.exe runs only from its own folder. tape setup adds that folder to your PATH, so tape runs from any terminal:

powershell
PS C:\Users\me> mkdir tape
PS C:\Users\me> tar -xf Downloads\tape-2.0.15-win64.zip -C tape
PS C:\Users\me> .\tape\tape.exe setup
Added C:\Users\me\tape to your PATH.
This terminal keeps its old PATH: open a new terminal and type
  tape --version

Then, in a new terminal:

powershell
PS C:\Users\me> tape --version
tape 2.0.15
tape ABI 1

What it does

Windows

  • Adds the folder that holds the tape.exe you ran to the end of your user’s PATH. No administrator rights are needed, and other users and the system PATH are not changed.
  • Leaves every other PATH entry exactly as it was.
  • Tells Windows about the change, so terminals you open afterwards find tape. The terminal you ran it in keeps its old PATH: open a new one.
  • Running it again does nothing and says the folder is on your PATH already.

To upgrade, extract the new version’s zip into the same folder: it stays on your PATH, so there is nothing to run. If you keep versions in folders of their own instead, run the old one’s tape.exe setup --remove and the new one’s tape.exe setup.

tape setup --remove takes the folder off your PATH again. Use it before you delete the folder.

Linux and macOS

The apt package installs tape on the PATH already, and tape setup says so. For an archive you extracted yourself, it prints the line to add to your shell’s profile (~/.bashrc, ~/.zshrc) and changes nothing:

bash
export PATH="/home/me/tape-2.0.15-linux:$PATH"

Exit codes

CodeMeaning
0Done, or nothing to do
1The PATH could not be read or written; it was left as it was
2Usage error

Last modified: