cleanup system bashrc upon uninstallation

parent d4ccb2de
...@@ -30,6 +30,20 @@ add_bsng_init () { ...@@ -30,6 +30,20 @@ add_bsng_init () {
} }
post_remove () {
if [[ -e /etc/bash.bashrc ]]; then
BASHFILE=/etc/bash.bashrc
else
BASHFILE=/etc/bashrc
fi
if [[ $(grep "bashstyle.sh" ${BASHFILE}) != "" ]]; then
sed -e '/bashstyle.sh/d' -i ${BASHFILE}
fi
}
post_install () { post_install () {
if [[ ! $DISABLE_POSTINSTALL ]]; then if [[ ! $DISABLE_POSTINSTALL ]]; then
......
...@@ -73,5 +73,6 @@ remove_bsng () { ...@@ -73,5 +73,6 @@ remove_bsng () {
for file in ${REMOVE_FILES[@]}; do for file in ${REMOVE_FILES[@]}; do
rm -rf "$file" rm -rf "$file"
done done
post_remove
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment