mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-13 00:39:46 +00:00
57 lines
861 B
Bash
57 lines
861 B
Bash
#!/bin/bash
|
|
|
|
cd /sources
|
|
tar xf vim-9.0.0228.tar.gz
|
|
cd vim-9.0.0228
|
|
|
|
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
|
|
|
|
./configure --prefix=/usr
|
|
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit 1
|
|
fi
|
|
|
|
make -j5
|
|
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit 1
|
|
fi
|
|
|
|
chown -Rv tester .
|
|
|
|
su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log
|
|
|
|
make install
|
|
|
|
ln -sv vim /usr/bin/vi
|
|
for L in /usr/share/man/{,*/}man1/vim.1; do
|
|
ln -sv vim.1 $(dirname $L)/vi.1
|
|
done
|
|
|
|
ln -sv ../vim/vim90/doc /usr/share/doc/vim-9.0.0228
|
|
|
|
cd /sources
|
|
rm -rf vim-9.0.0228
|
|
|
|
# Configure vim
|
|
cat > /etc/vimrc << "EOF"
|
|
" Begin /etc/vimrc
|
|
|
|
" Ensure defaults are set before customizing settings, not after
|
|
source $VIMRUNTIME/defaults.vim
|
|
let skip_defaults_vim=1
|
|
|
|
set nocompatible
|
|
set backspace=2
|
|
set mouse=
|
|
syntax on
|
|
if (&term == "xterm") || (&term == "putty")
|
|
set background=dark
|
|
endif
|
|
|
|
" End /etc/vimrc
|
|
EOF
|
|
|