Skip to content

Instantly share code, notes, and snippets.

@dalgu90
Created February 19, 2018 03:03
Show Gist options
  • Save dalgu90/4c2b3dd68e6fe84c1f5017775019de78 to your computer and use it in GitHub Desktop.
Save dalgu90/4c2b3dd68e6fe84c1f5017775019de78 to your computer and use it in GitHub Desktop.
Install linux tree command on local path
#!/bin/sh
PREFIX="$HOME/.local/"
install_tree() {
# The project page of linux "tree" command is located at http://mama.indstate.edu/users/ice/tree
TMP_TREE_DIR="/tmp/$USER/tree"; mkdir -p $TMP_TREE_DIR
wget -nc -O $TMP_TREE_DIR/tree.tgz "http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz"
tar -xvzf $TMP_TREE_DIR/tree.tgz -C $TMP_TREE_DIR --strip-components 1
cd $TMP_TREE_DIR
make
mkdir -p "$PREFIX/bin"
mv -v tree "$PREFIX/bin"
# Maybe $PREFIX/bin was added to $PATH, if you run the wookayin/dotfiles script
# echo "export PATH=$PREFIX/bin:$PATH"
}
install_tree
@feevos
Copy link

feevos commented Feb 15, 2021

thanks, super helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment