Skip to content

Instantly share code, notes, and snippets.

@sandalsoft
Created August 28, 2019 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandalsoft/4888f41b84102d27de0521d8986762ed to your computer and use it in GitHub Desktop.
Save sandalsoft/4888f41b84102d27de0521d8986762ed to your computer and use it in GitHub Desktop.
#!/bin/bash -l
export DOTFILES_DIR='/Users/Eric/dotfiles'
export IN_PROCESS_FILE='__Gathering_Installed_Packages_____It_takes_a_minute'
# create status file so we know the process is running
touch $DOTFILES_DIR/$IN_PROCESS_FILE
# List npm globally installed packages
/usr/local/bin/npm ls -g --parseable --depth=0 | awk '{gsub(/\/.*\//,"",$1); print}' | sort -u > $DOTFILES_DIR/npm.list.txt
# list pip installed
/Users/eric/.pyenv/shims/pip list | grep -v Package | grep -v '\-\-\-\-\-' | awk '{print $1}' > $DOTFILES_DIR/pip.list.txt
# List of Homebrew installs
/usr/local/bin/brew list > $DOTFILES_DIR/brew.list.txt
/usr/local/bin/brew cask list > $DOTFILES_DIR/brew.cask.list.txt
# Clear ghetto-ass status file
rm $DOTFILES_DIR/$IN_PROCESS_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment