Skip to content

Update scripts for apm, apt, brew, carthage, gem, npm, pip yum, and more

Notifications You must be signed in to change notification settings

nameKey-hub/update

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Update command scripts

Want to update your computer software? The update command is for you.

When you run update the command will run many software updates and upgrades:

  • Linux: Ubuntu apt, RedHat yum, Arch yay, Fedora dnf, etc.
  • macOS: softwareupdate, Homebrew brew, Mac App Store mas, etc.
  • tooling: Node npm, Python pip, Rust cargo, Ruby gem, Atom apm, etc.
  • source code management: git pull, hg pull, etc.
  • any of your own custom scripts, before and after everything else.

Install

Clone the repo to your own system:

$ git clone https://github.com/UpdateCommand/update.git ~/update

Add the bin directory to your own path:

$ export PATH="$PATH:~/update/bin"

Copy the config directory to your own directory:

$ cp -R ~/update/config/update ~/.config/update

Run the script:

$ update

What's included

This project has Unix update scripts for many tools, systems, package managers, language modules, et. al.

We welcome additions to these scripts.

Configuration

The command uses a config home directory and program subdirectory:

~/.config/update

You can change the config home directory by setting the environment variable XDG_CONFIG_HOME. This is POSIX standard. The default is $HOME/.config/.

Run your own scripts first and last

You can configure your own scripts to run first before the start of the update commands, or last after the finish of the update commands.

Put your own scripts in these directories:

~/.config/update/update-run-first
~/.config/update/update-run-last

For advanced users:

  • You can use as many files and subdirectories as you like.

  • The program runs the user-executable files, and skips the non-user-executable files.

Package manager files

The program also reads these package manager files:

~/.config/Brewfile/Brewfile
~/.config/Gemfile/Gemfile
~/.config/Podfile/Podfile

Source code management directories

You can configure the source code management directories to update.

Edit the files in these directories:

~/.config/update/update-git-pull/directories
~/.config/update/update-hg-pull/directories

For example edit the git pull directories default file:

~/.config/update/update-git-pull/directories

The default file currently has these:

~/.config/bash
~/.config/emacs
~/.config/fish
~/.config/tmux
~/.config/vim
~/.config/zsh
~/.emacs.d
~/.oh-my-zsh
~/.tmux
~/.vim.d
~/.zshrc

For advanced users:

  • You can use as many files and subdirectories as you like.

  • The program updates the existing directories, and skips the non-existing directories.

To run daily

To run the update command daily, you can use the crontab command.

To see if you have an existing crontab file, you can list it by running this:

crontab -l > ~/.crontab

Edit the ~/.crontab file.

Add a line that runs the nice command and use the full path to the update command:

@daily /usr/bin/nice /foo/bar/update

Then install the file:

crontab ~/.crontab

Tracking

  • Package: UpdateCommand
  • Version: 6.3.0
  • Created: 2005-07-05
  • Updated: 2021-01-21T07:23:03Z
  • License: GPL-2.0-only
  • Contact: Joel Parker Henderson (https://joelparkerhenderson.com)

About

Update scripts for apm, apt, brew, carthage, gem, npm, pip yum, and more

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%