DEVenv/linux_install.sh

38 lines
1.6 KiB
Bash
Raw Normal View History

2021-08-21 14:31:45 +00:00
vim_dir=${HOME}/.vim
vim_plug_dir=${vim_dir}/autoload
2022-01-19 02:47:12 +00:00
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
tools_dir=${script_dir}/Tools
bin_dir=${tools_dir}/binaries
2021-08-21 14:31:45 +00:00
mkdir --parents ${vim_plug_dir}
2022-01-19 02:47:12 +00:00
mkdir --parents ${bin_dir}
mkdir --parents ~/.config/nvim
2021-08-21 14:31:45 +00:00
if [[ ! -f "${vim_plug_dir}/plug.vim" ]]; then
wget --directory-prefix=${vim_plug_dir} https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
2020-07-22 01:02:05 +00:00
fi
2019-02-05 05:43:53 +00:00
2021-08-21 14:31:45 +00:00
if [[ ! -f "${vim_dir}/clang-format.py" ]]; then
wget --directory-prefix=${vim_dir} https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/clang-format.py
2021-01-06 23:23:02 +00:00
fi
2022-01-19 02:47:12 +00:00
# ------------------------------------------------------------------------------
2020-11-05 03:41:47 +00:00
# Dependencies
2022-01-19 02:47:12 +00:00
# ------------------------------------------------------------------------------
sudo apt install exuberant-ctags neovim clang-format ripgrep
2019-02-05 05:43:53 +00:00
2022-01-19 02:47:12 +00:00
# ------------------------------------------------------------------------------
2020-11-05 03:41:47 +00:00
# NVim
2022-01-19 02:47:12 +00:00
# ------------------------------------------------------------------------------
2022-05-16 12:51:54 +00:00
cp --force ${script_dir}/Installer/os_vimrc ~/.vimrc
cp --force ${script_dir}/Installer/os_clang_format_style_file ~/_clang-format
2022-01-19 02:47:12 +00:00
cp --force ${script_dir}/Installer/unix_nvim_init.vim ~/.config/nvim/init.vim
2020-11-05 03:41:47 +00:00
2022-01-19 02:47:12 +00:00
# ------------------------------------------------------------------------------
2020-11-05 03:41:47 +00:00
# Ctags
2022-01-19 02:47:12 +00:00
# ------------------------------------------------------------------------------
rm --force ${bin_dir}/ctags_cpp.sh
echo ctags --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ \$\@ >> ${bin_dir}/ctags_cpp.sh
2022-05-16 12:51:54 +00:00
chmod +x ${bin_dir}/ctags_cpp.sh