Repository navigation
Expand file tree
/
Copy path73-vim.sh
More file actions
executable file
·72 lines (56 loc) · 1.71 KB
/
Copy path73-vim.sh
File metadata and controls
executable file
·72 lines (56 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# LFS 13.0-systemd - Chapter 8.73 - Vim-9.2.0078
# Auto-generated from chapter08/vim.html. Run inside the chroot.
# Test-suite steps are commented out; uncomment to run them.
set -e
SRC="${SRC:-/sources}"
TARBALL="vim-9.2.0078.tar.gz"
cd "$SRC"
echo ">>> Building Vim-9.2.0078 from $TARBALL"
if [ ! -f "$TARBALL" ]; then
echo "ERROR: $SRC/$TARBALL not found -- aborting (nothing removed)." >&2
exit 1
fi
__srcdir=$(tar tf "$TARBALL" | sed 's|^\./||' | awk -F/ 'NF{print $1; exit}')
if [ -z "$__srcdir" ]; then
echo "ERROR: could not determine source dir from $TARBALL -- aborting." >&2
exit 1
fi
rm -rf "${SRC:?}/${__srcdir:?}"
tar xf "$TARBALL"
cd "${SRC:?}/${__srcdir:?}"
# ----- begin LFS book commands -----
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
./configure --prefix=/usr
make
# ----- test suite (optional, slow) -- uncomment to run -----
# chown -R tester .
# sed '/test_plugin_glvs/d' -i src/testdir/Make_all.mak
# ----- test suite (optional, slow) -- uncomment to run -----
# su tester -c "TERM=xterm-256color 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/vim92/doc /usr/share/doc/vim-9.2.0078
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
vim -c ':options'
# ----- end LFS book commands -----
cd "$SRC"
rm -rf "${SRC:?}/${__srcdir:?}"
echo ">>> Done: Vim-9.2.0078"