#!/bin/sh
chattr -i /etc/shell_history 2>/dev/null || true
rm -f /etc/shell_history /etc/shell_init.done /etc/profile.d/include
rm -f /etc/zsh/zshrc.d/pre /etc/zsh/zshrc.d/end
rm -f /etc/fish/conf.d/alias.fish /etc/fish/conf.d/config.fish
for f in /etc/profile /etc/bash.bashrc /etc/bash/bashrc /etc/zsh/zshrc.local /etc/zsh/zshenv; do
	[ -f "$f" ] && sed -i -e '\@^\. /etc/profile\.d/init$@d' \
		-e '\@^\. /etc/bash/local$@d' \
		-e '\@^\. /etc/zsh/zshrc\.d/end$@d' \
		-e '\@^\. /etc/zsh/zshrc\.d/pre$@d' "$f" 2>/dev/null
done
[ -f /etc/zsh/zshenv ] && [ ! -s /etc/zsh/zshenv ] && rm -f /etc/zsh/zshenv
true
