2018-03-12 10:52:13 -04:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
echo 'Installing Awesome Vim from '$1
|
|
|
|
cd $1
|
2022-11-20 09:24:47 -05:00
|
|
|
python update_plugins.py || python3 update_plugins.py
|
2018-03-12 10:52:13 -04:00
|
|
|
|
2021-07-04 16:57:32 -04:00
|
|
|
VIMRC="\" DO NOT EDIT THIS FILE
|
|
|
|
\" Add your own customizations in $1/my_configs.vim
|
|
|
|
|
|
|
|
set runtimepath+=$1
|
2018-03-12 10:52:13 -04:00
|
|
|
|
|
|
|
source $1/vimrcs/basic.vim
|
|
|
|
source $1/vimrcs/filetypes.vim
|
|
|
|
source $1/vimrcs/plugins_config.vim
|
|
|
|
source $1/vimrcs/extended.vim
|
|
|
|
|
|
|
|
try
|
2021-07-04 16:57:32 -04:00
|
|
|
source $1/my_configs.vim
|
2018-03-12 10:52:13 -04:00
|
|
|
catch
|
|
|
|
endtry"
|
|
|
|
|
2020-01-20 03:26:31 -05:00
|
|
|
if [ "$2" = "--all" ]; then
|
|
|
|
USERS=$(ls -l /home | awk '{if(NR>1)print $9}')
|
|
|
|
for user in $USERS; do
|
2018-03-12 10:52:13 -04:00
|
|
|
homepath=$(eval echo "~$user")
|
|
|
|
IFS=''
|
|
|
|
echo $VIMRC > ${homepath}/.vimrc
|
|
|
|
unset IFS
|
|
|
|
echo "Installed the Ultimate Vim configuration for user $user successfully! Enjoy :-)"
|
|
|
|
done
|
|
|
|
echo "Installed the Ultimate Vim configuration successfully! Enjoy :-)"
|
|
|
|
exit 0
|
|
|
|
else
|
2020-01-20 03:26:31 -05:00
|
|
|
SELECTED_USERS=${@:2}
|
|
|
|
echo "Selected users: $SELECTED_USERS"
|
|
|
|
for user in $SELECTED_USERS; do
|
2020-07-10 23:26:23 -04:00
|
|
|
homepath=$(eval echo "~$user")
|
2018-03-12 10:52:13 -04:00
|
|
|
IFS=''
|
|
|
|
echo $VIMRC > ${homepath}/.vimrc
|
|
|
|
unset IFS
|
|
|
|
echo "Installed the Ultimate Vim configuration for user $user successfully! Enjoy :-)"
|
|
|
|
done
|
|
|
|
exit 0
|
|
|
|
fi
|