Browse Source

new installation process

main
pvincent 3 weeks ago
parent
commit
66d206e6e0
  1. 20
      lib/initiate.bash

20
lib/initiate.bash

@ -69,6 +69,13 @@ function link_etc {
fi
}
function arch_profile {
if ! cmp -s /etc/profile "$MIAOU_BASH_DIR"/etc/profile.arch; then
sudo cp "$MIAOU_BASH_DIR"/etc/profile.arch /etc/profile
echo 'arch /etc/profile fixed!'
fi
}
function arch_vimrc {
mkdir -p /etc/vim
if ! grep -q '/etc/vim/vimrc.local' /etc/vimrc; then
@ -91,7 +98,7 @@ function is_debian_like {
}
function link_config_files {
is_arch_like && arch_vimrc
is_arch_like && arch_vimrc && arch_profile
link_etc vimrc.core vim
link_etc vimrc.miaou vim
@ -111,15 +118,8 @@ function link_config_files {
function force_reload {
echo FORCE RELOAD
echo inputrc
if bind -f /etc/inputrc 2>/dev/null; then
: # arch: dismiss harmless warning
fi
echo profile
if ! source /etc/profile 2>/dev/null; then
# arch: dismiss error `PS1: unbound variable`
echo bashrc
! source /etc/bash.bashrc || true
fi
bind -f /etc/inputrc 2>/dev/null # arch: dismiss harmless warning
source /etc/profile
echo DONE
}

Loading…
Cancel
Save