dotfiles/bin/update-everything.sh

100 lines
1.4 KiB
Bash
Raw Permalink Normal View History

2015-07-26 20:27:32 +02:00
#!/usr/bin/env bash
2014-11-03 17:40:13 +01:00
#
2016-11-03 22:23:20 +01:00
# macOS
2014-11-03 17:40:13 +01:00
# -------------
2019-06-08 02:42:18 +02:00
# echo ""
# echo "$(tput setaf 3) Update macOS Apps"
# echo "------------------------------$(tput sgr0)"
2014-11-03 17:40:13 +01:00
2019-06-08 02:42:18 +02:00
# sudo softwareupdate -i -a
2018-10-22 23:16:39 +02:00
# mas upgrade
2016-11-03 22:23:20 +01:00
2014-11-03 17:40:13 +01:00
#
# Homebrew
# -------------
2017-08-14 15:34:52 +02:00
echo ""
echo ""
2017-10-16 17:08:52 +02:00
echo "$(tput setaf 3) Update Homebrew"
2017-06-12 01:21:12 +02:00
echo "------------------------------$(tput sgr0)"
2014-11-03 17:40:13 +01:00
brew update
2016-10-14 21:59:34 +02:00
brew upgrade
2014-11-03 17:40:13 +01:00
brew cleanup
#
2019-06-08 02:42:18 +02:00
# Node.js & npm
2014-11-03 17:40:13 +01:00
# -------------
2017-08-14 15:34:52 +02:00
echo ""
echo ""
2019-08-18 02:07:17 +02:00
echo "$(tput setaf 3) Update Node.js & npm"
2017-06-12 01:21:12 +02:00
echo "------------------------------$(tput sgr0)"
2014-11-03 17:40:13 +01:00
2019-08-18 02:07:17 +02:00
# shellcheck source=/dev/null
[ -s "$HOME/.nvm" ] && . "$HOME/.nvm/nvm.sh"
2019-06-08 02:42:18 +02:00
# Update to latest nvm Node.js
2021-01-30 22:15:43 +01:00
nvm install node --reinstall-packages-from=node
nvm alias default node
2019-06-08 02:42:18 +02:00
2014-11-03 17:40:13 +01:00
# update npm itself
2021-01-30 22:15:43 +01:00
nvm install-latest-npm
# npm install npm -g
2014-11-03 17:40:13 +01:00
# update all global packages
2015-03-28 02:42:45 +01:00
npm update -g
2014-11-03 17:40:13 +01:00
2017-06-18 03:05:06 +02:00
2014-11-03 17:40:13 +01:00
#
# Ruby
# -------------
2018-10-22 23:16:39 +02:00
# echo ""
# echo ""
# echo "$(tput setaf 3) Update rvm"
# echo "------------------------------$(tput sgr0)"
2014-11-03 17:40:13 +01:00
2018-10-22 23:16:39 +02:00
# # update rvm itself
# rvm get stable
# rvm reload
2015-01-13 16:37:25 +01:00
2018-10-22 23:16:39 +02:00
# # update all gemsets
# rvm gemset update
2015-01-13 16:37:25 +01:00
2018-10-22 23:16:39 +02:00
# # cleanup
# rvm cleanup all
2014-11-03 17:40:13 +01:00
2018-03-01 22:39:58 +01:00
#
# ClamAV
# -------------
echo ""
echo ""
echo "$(tput setaf 3) Update ClamAV Database"
echo "------------------------------$(tput sgr0)"
freshclam -v
2016-11-15 22:25:44 +01:00
#
# GPG
# -------------
2017-08-14 15:34:52 +02:00
echo ""
echo ""
2017-10-16 17:08:52 +02:00
echo "$(tput setaf 3) Refresh GPG keys"
2017-06-12 01:21:12 +02:00
echo "------------------------------$(tput sgr0)"
2016-11-15 22:25:44 +01:00
gpg --refresh-keys
2014-11-03 17:40:13 +01:00
2017-08-14 15:34:52 +02:00
echo ""
2017-10-16 17:08:52 +02:00
echo "$(tput setaf 2) -------------------------------"
2017-06-12 01:21:12 +02:00
echo " ✓ all done$(tput sgr0)"