/etc/skel/.bashrc: don't be annoying when using sudo
This commit is contained in:
parent
07069eded2
commit
7cc802fb3d
1 changed files with 6 additions and 7 deletions
|
@ -56,12 +56,6 @@ function print_header() {
|
|||
echo " "
|
||||
}
|
||||
|
||||
function reset_shell() {
|
||||
clear
|
||||
update_bashrc
|
||||
print_header
|
||||
}
|
||||
|
||||
function update_bashrc() {
|
||||
cp -f /etc/skel/.bashrc ~/.bashrc
|
||||
}
|
||||
|
@ -108,4 +102,9 @@ if ! shopt -oq posix; then
|
|||
fi
|
||||
|
||||
# Hello, world!
|
||||
reset_shell
|
||||
if [[ ! -z $SUDO_USER ]]; then
|
||||
clear
|
||||
print_header
|
||||
fi
|
||||
|
||||
update_bashrc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue