Files
init.sh/modules/install_profile.sh
2021-07-23 12:24:11 +02:00

33 lines
694 B
Bash

# Profile
export VER_install_profile="0.0.1"
install_profile()
{
installfile ansi_shadow.flf /usr/share/figlet/ansi_shadow.flf
# Create a dir in home so /home/* is always interpreted correctly
mkdir -pv /home/dummy
for usr in /root /home/*; do
backupdist $usr/{,.}profile $usr/.bashrc
installfile {{.,}profile,.bashrc} $usr/
done
# Remove dummy dir
rm -rf /home/dummy
backupdist /etc/motd
installfile motd /etc/motd
}
precheck_install_profile()
{
[[ -d /home/dummy ]] && (
prnt E "/home/dummy existe mais est réservé a un usage interne."
die 155
)
}
export -f install_profile
export -f precheck_install_profile