summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2020-06-16 21:53:40 +0100
committerDavid T. Sadler <davidtsadler@googlemail.com>2020-06-16 21:53:40 +0100
commite0614257b70714841dacb3f43821ff6d85ae9e21 (patch)
tree84a455c7cb512e482a4043e3b9acb457430a46a4
parent0c2774d2a5da6f8cfe4aa26f0dfa68f31423dabc (diff)
Remove bash_history if it exits from user's home directory as it will be
replaced by dot files
-rw-r--r--gohan.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/gohan.sh b/gohan.sh
index 789d954..eb1b9ce 100644
--- a/gohan.sh
+++ b/gohan.sh
@@ -62,6 +62,7 @@ add_user() {
usermod -aG wheel "$name"
[ ! -d "/home/$name/.local/src" ] && mkdir -p "/home/$name/.local/src" && chown -R "$name":"$name" /home/"$name/.local"
# Remove these files as they will be installed as part of the dotfiles.
+ [ -f "/home/$name/.bash_history" ] && rm /home/$name/.bash_history
[ -f "/home/$name/.bash_logout" ] && rm /home/$name/.bash_logout
[ -f "/home/$name/.bash_profile" ] && rm /home/$name/.bash_profile
[ -f "/home/$name/.bashrc" ] && rm /home/$name/.bashrc