Created
April 10, 2018 08:06
-
-
Save twinkfrag/d8c5bde02b15623ec8a709aa0830fcbf to your computer and use it in GitHub Desktop.
screenの中でしかapt upgradeできないようにする
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
# write this in /etc/bash.bashrc to cannot "apt upgrade" not in screen | |
apt() { | |
if [[ $@ == "upgrade" ]]; then | |
if [ -n "$STY" ]; then | |
command apt "$@" | |
else | |
echo 'you should apt upgrade in "screen -R"' | |
fi | |
else | |
command apt "$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment