Last active
May 12, 2021 01:26
-
-
Save heiwa4126/89aab32982e2982aaf8e9bc020a588ef to your computer and use it in GitHub Desktop.
Ubuntu 18.04LTSで、手動アップデートの際に使ってるスクリプト。~/bin/update.shに置いてる。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
sudo -i sh -c "\ | |
apt-get update ;\ | |
apt-get -uyd dist-upgrade\ | |
" | |
echo "Continue? (Enter or Ctrl+C)" ; read Wait | |
sudo -i sh -c "\ | |
apt-get -uy dist-upgrade ;\ | |
apt-get autoremove --purge -y ;\ | |
apt-get autoclean \ | |
" | |
NEED_REBOOT=/var/run/reboot-required | |
if [ -f "$NEED_REBOOT" ] ; then | |
cat "$NEED_REBOOT" | |
fi | |
NEED_REBOOT_PKG=/var/run/reboot-required.pkgs | |
if [ -f "$NEED_REBOOT_PKG" ] ; then | |
cat "$NEED_REBOOT_PKG" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
のが特徴