Code Monkey home page Code Monkey logo

update's Introduction

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 ([email protected])

update's People

Contributors

joelparkerhenderson avatar crjackso avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.