henkla / update

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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: Debian/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: 5.4.0
  • Created: 2005-07-05
  • Updated: 2019-01-04T02:14:08Z
  • License: GPL
  • Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)

About

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


Languages

Language:Shell 100.0%