Skip to content

Instantly share code, notes, and snippets.

@JLHwung
Last active June 9, 2016 21:51
Show Gist options
  • Save JLHwung/06717b8a368ad6c315e4bee6df31a843 to your computer and use it in GitHub Desktop.
Save JLHwung/06717b8a368ad6c315e4bee6df31a843 to your computer and use it in GitHub Desktop.
Migrate packages installed in old version of basicTeX to the new version of basicTeX on OS X
#!/usr/bin/zsh
oldVersion=2015basic
newVersion=2016basic
needInstalled=`comm -23 <(/usr/local/texlive/$oldVersion/bin/universal-darwin/tlmgr list --only-installed | sed 's/:.*$//') <(/usr/local/texlive/$newVersion/bin/universal-darwin/tlmgr list --only-installed | sed 's/:.*$//') | awk -F ' ' '{print $2}' ORS=' '`
eval "sudo tlmgr install $needInstalled $@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment