Update
A simple tool for admins to keep various command line tools updated. It currently supports:
- pip
- homebrew
- apt-get
- rpi-update
For linux updates, it is geared for the Raspberry Pi's Raspbian OS.
Install
The preferred way is to use pypi.org
pip install update
You can also do:
git clone https://github.com/walchko/update.git cd update python setup.py install
If you plan on doing some development, instead of install you can do develop.
Usage
[kevin@Tardis ~]$ update -h usage: A simple automation tool to update your system. [-h] [-k] optional arguments: -h, --help show this help message and exit -k, --kernel update linux kernel, default is not too
The default is everything gets updated except the linux kernel.
kevin@Tardis tmp $ update OS: macOS Executing NOT as root -[pip]---------- [>] pip list --outdated >> Found 4 packages [>] pip install -U setuptools [>] pip install -U PySDL2 [>] pip install -U requests-toolbelt [>] pip install -U rst2pdf -[brew]---------- [>] brew update [>] brew outdated >> Found 15 packages [>] brew upgrade gd [>] brew upgrade git [>] brew upgrade harfbuzz [>] brew upgrade imagemagick [>] brew upgrade iperf3 [>] brew upgrade libtool [>] brew upgrade little-cms2 [>] brew upgrade luajit [>] brew upgrade node [>] brew upgrade pandoc [>] brew upgrade pkg-config [>] brew upgrade poco [>] brew upgrade srcclr/srcclr/srcclr [>] brew upgrade webp [>] brew upgrade zeromq -[npm]---------- [>] npm outdated -g | awk 'NR>1 {print $1}' >> Found 1 packages [>] npm update -g npm
Now generally this works, but sometimes it doesn't so look at the errors and try
to fix them. For example, lxml
barfs all over the place an crashes this, but
if you do:
sudo apt-get install libxml2-dev libxslt-dev python-dev
And then run it, it works because when it now tries to compile lxml
, it has all
of the development files.
Linux
update
needs to get executed with sudo
to upgrade system packages. However,
for pip
and npm
they will be upgraded using the pi user account. The
assumption is all of /usr/local
is owned by the user pi.
macOS
update
doesn't use sudo
and assumes the user has proper privileges to
update all software.
Development
python setup.py develop python setup.py sdist twine upload dist/*
Changes
Date | Version | Notes |
---|---|---|
24 Jul 16 | 0.4.4 | refactor and small bug fixes |
23 Jul 16 | 0.4.2 | rename and lots of fixes |
11 Jul 15 | 0.1.0 | created |