refactor: move extras to files
This commit is contained in:
parent
f86f0aef00
commit
e522932392
4 changed files with 6 additions and 4 deletions
10
bootstrap.sh
10
bootstrap.sh
|
@ -149,7 +149,7 @@ inject_shell_configuration() {
|
|||
echo "Setting up shell configuration extras..."
|
||||
if [[ -z $(cat $SHELL_CONFIG_PATH | grep $BLOCK_DELIMITER_PATTERN) ]]; then
|
||||
echo "# $BLOCK_DELIMITER_PATTERN\:start
|
||||
source $WORKING_PATH/shell_extras
|
||||
source $WORKING_PATH/files/shell_extras
|
||||
# $BLOCK_DELIMITER_PATTERN\:end" >> $SHELL_CONFIG_PATH
|
||||
echo "✅ Added managed block to $SHELL_CONFIG_PATH"
|
||||
else
|
||||
|
@ -164,11 +164,13 @@ inject_shell_configuration() {
|
|||
inject_vim_configuration() {
|
||||
pre_step "Inject managed block in vim configuration"
|
||||
|
||||
WORKING_PATH=$(git rev-parse --show-toplevel)
|
||||
|
||||
if [[ -f $EDITOR_CONFIG_FILE ]]; then
|
||||
echo "Setting up NVIM configuration extras..."
|
||||
if [[ -z $(cat $EDITOR_CONFIG_FILE | grep $BLOCK_DELIMITER_PATTERN) ]]; then
|
||||
echo "\" $BLOCK_DELIMITER_PATTERN\:start
|
||||
source $WORKING_PATH/extras.vim
|
||||
source $WORKING_PATH/files/extras.vim
|
||||
\" $BLOCK_DELIMITER_PATTERN\:end\n\n" >> $EDITOR_CONFIG_FILE.new
|
||||
cat $EDITOR_CONFIG_FILE >> $EDITOR_CONFIG_FILE.new
|
||||
|
||||
|
@ -181,8 +183,8 @@ inject_vim_configuration() {
|
|||
fi
|
||||
|
||||
echo "Setting up git configuration..."
|
||||
source $WORKING_PATH/git_config
|
||||
echo "✅ Set up git configuration, see $WORKING_PATH/git_config for details!"
|
||||
source $WORKING_PATH/files/git_config
|
||||
echo "✅ Set up git configuration, see $WORKING_PATH/files/git_config for details!"
|
||||
}
|
||||
|
||||
###########################################################
|
||||
|
|
Loading…
Reference in a new issue