Skip to content

Instantly share code, notes, and snippets.

@abdularis
Last active January 22, 2023 07:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdularis/8fcb55fc689b25f3d704cca5fbee4051 to your computer and use it in GitHub Desktop.
Save abdularis/8fcb55fc689b25f3d704cca5fbee4051 to your computer and use it in GitHub Desktop.
#!/bin/bash
# mac os is not linux and therefore it is not shipped with gnu command line tools intead with freeBSD version
tool_list=(
# GNU programs non-existing in macOS
"watch"
"wget"
"wdiff"
# "gdb" intel only
"autoconf"
# GNU programs whose BSD counterpart is installed in macOS
"coreutils"
"binutils"
"diffutils"
"ed"
"findutils"
"gawk"
"gnu-indent"
"gnu-sed"
"gnu-tar"
"gnu-which"
"grep"
"gzip"
"screen"
# GNU programs existing in macOS which are outdated
"bash"
"emacs"
"gpatch"
"less"
"m4"
"make"
"nano"
"bison"
# BSD programs existing in macOS which are outdated
"flex"
# Other common/preferred programs in GNU/Linux distributions
"libressl"
"file-formula"
"git"
"openssh"
"perl"
"python"
"rsync"
"unzip"
"vim"
)
for tool in "${tool_list[@]}"; do
echo "Installing: " $tool;
brew install $tool
done
# put this on your ~/.zshrc or ~/.bashrc
#
# BREW_PREFIX=$(brew --prefix)
# if [ ! -z "$BREW_PREFIX" ]; then
# for bindir in "${BREW_PREFIX}/opt/"*"/libexec/gnubin"; do export PATH=$bindir:$PATH; done
# for bindir in "${BREW_PREFIX}/opt/"*"/bin"; do export PATH=$bindir:$PATH; done
# for mandir in "${BREW_PREFIX}/opt/"*"/libexec/gnuman"; do export MANPATH=$mandir:$MANPATH; done
# for mandir in "${BREW_PREFIX}/opt/"*"/share/man/man1"; do export MANPATH=$mandir:$MANPATH; done
# echo "You're using GNU flavor cli tools 🛠️"
# fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment