#!/bin/bash : << cmt This script is used to setup the environment for development in C and C++. cmt user = "" if [ '$(whoami)' = 'root' ]; then user = "" else user = "sudo" fi # To setup the environment function settingUpVimrc{ # Setting up the .vimrc VIMRC_LOCATION = $(find $HOME/ -iwholename .vimrc) if [ "$HOME/.vimrc" = "$VIMRC_LOCATION" ]; then mv $HOME/.vimrc $HOME/.vimrc.bck fi mv $(pwd)/.vimrc $HOME/.vimrc source $HOME/.vimrc } # To setup latest vim function settingUpLatestVim{ # Installing the required packages. $user apt install git $user apt install make $user apt install clang $user apt install libtool-bin $user apt install libxt-dev $user apt install python3-dev $user apt install libpython3-dev # Clone the vim official repo. git clone https://github.com/vim/vim.git # Configure for compilation. DIR = /usr/local # Directory to setup the latest vim build. if [ $# -gt 0 ]; then DIR = $1 fi ./vim/src/configure --with-features=huge --enable-python3interp=yes --enable-multibyte --enable-cscope --prefix=$DIR } # For ctags # $user apt install universal-ctags -y