mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-24 04:21:26 -05:00
Compare commits
No commits in common. "b22252580742e05cce3aa63d5b223aee1b08560e" and "6b5565d57f5f6343dd853cfb76563c54fa4047ce" have entirely different histories.
b222525807
...
6b5565d57f
2 changed files with 36 additions and 36 deletions
56
update
56
update
|
@ -28,13 +28,13 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -t 1 ]]; then
|
if [[ -t 1 ]]; then
|
||||||
cfg_red=$'\e[1;31m'
|
cbg_blue=$'\e[44m'
|
||||||
cfg_green=$'\e[1;32m'
|
cbg_red_bold=$'\e[1;41m'
|
||||||
cfg_white=$'\e[1;37m'
|
|
||||||
cbg_red=$'\e[1;41m'
|
|
||||||
cbg_yellow=$'\e[1;43m'
|
|
||||||
cbg_blue=$'\e[1;44m'
|
|
||||||
cbg_black=$'\e[40m'
|
cbg_black=$'\e[40m'
|
||||||
|
cbg_yellow=$'\e[43m'
|
||||||
|
cfg_green_bold=$'\e[1;32m'
|
||||||
|
cfg_red_bold=$'\e[1;31m'
|
||||||
|
cfg_white_bold=$'\e[1;37m'
|
||||||
c_reset=$'\e[0m'
|
c_reset=$'\e[0m'
|
||||||
else
|
else
|
||||||
cbg_blue='#'
|
cbg_blue='#'
|
||||||
|
@ -46,9 +46,9 @@ fi
|
||||||
|
|
||||||
# error: output and log error
|
# error: output and log error
|
||||||
function error {
|
function error {
|
||||||
printf '%s\n' "$cbg_blue $c_reset$cbg_red ! ERROR: $c_reset$cfg_red $2 " >&2
|
printf '%s\n' "$cbg_blue $c_reset$cbg_red_bold ! ERROR: $c_reset$cfg_red_bold $2 " >&2
|
||||||
printf '%s\n' "$cbg_blue $c_reset$cbg_red ! COMMAND: $c_reset ${cfg_white}=> $1$c_reset" >&2
|
printf '%s\n' "$cbg_blue $c_reset$cbg_red_bold ! COMMAND: $c_reset ${cfg_white_bold}=> $1$c_reset" >&2
|
||||||
[[ -n "$3" ]] && printf '%s\n' "$cbg_blue $c_reset$cbg_red ! OUTPUT: $c_reset$cfg_white $3" >&2
|
[[ -n "$3" ]] && printf '%s\n' "$cbg_blue $c_reset$cbg_red_bold ! OUTPUT: $c_reset$cfg_white_bold $3" >&2
|
||||||
printf '%s\n%s\n%s\n' "DATE: @ $(date)" "ERROR: $2" "COMMAND: $1" >> "$script_home/$error_log"
|
printf '%s\n%s\n%s\n' "DATE: @ $(date)" "ERROR: $2" "COMMAND: $1" >> "$script_home/$error_log"
|
||||||
[[ -n "$3" ]] && printf '%s\n' "OUTPUT: $3" >> "$script_home/$error_log"
|
[[ -n "$3" ]] && printf '%s\n' "OUTPUT: $3" >> "$script_home/$error_log"
|
||||||
printf '\n' >> "$script_home/$error_log"
|
printf '\n' >> "$script_home/$error_log"
|
||||||
|
@ -117,9 +117,9 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Neovim Config Update Tool ~~~ $c_reset
|
||||||
process_status="$(install -d "$local_bundle_dir" 2>&1)"
|
process_status="$(install -d "$local_bundle_dir" 2>&1)"
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error "install -d $local_bundle_dir" "User plugin directory couldn't be created" "$process_status"
|
error "install -d $local_bundle_dir" "User plugin directory couldn't be created" "$process_status"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -139,12 +139,12 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Neovim Config Update Tool ~~~ $c_reset
|
||||||
} >> "$user_vim_config"
|
} >> "$user_vim_config"
|
||||||
|
|
||||||
if [[ -e "$user_vim_config" ]]; then
|
if [[ -e "$user_vim_config" ]]; then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error "touch $user_vim_config" "User config couldn't be created" "$process_status"
|
error "touch $user_vim_config" "User config couldn't be created" "$process_status"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -157,9 +157,9 @@ printf '\n%s' "$cbg_blue >> Updating darkcloud-nvimconfig:$c_reset"
|
||||||
process_status="$(git pull origin master 2>&1)"
|
process_status="$(git pull origin master 2>&1)"
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error 'git pull origin master' 'Git failed to sync the repo' "$process_status"
|
error 'git pull origin master' 'Git failed to sync the repo' "$process_status"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -173,9 +173,9 @@ printf '%s' "$cbg_blue $c_reset$cbg_yellow + Updating plugin URLs:$c_reset"
|
||||||
process_status="$(git submodule sync 2>&1)"
|
process_status="$(git submodule sync 2>&1)"
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error 'git submodule sync' 'Git failed to sync the submodules' "$process_status"
|
error 'git submodule sync' 'Git failed to sync the submodules' "$process_status"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -188,13 +188,13 @@ if (( ! $? )); then
|
||||||
process_status=$(git submodule update --init --recursive 2>&1)
|
process_status=$(git submodule update --init --recursive 2>&1)
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error 'git submodule update --init --recursive' 'Git failed to update the submodules' "$process_status"
|
error 'git submodule update --init --recursive' 'Git failed to update the submodules' "$process_status"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error 'git submodule foreach git fetch --all' "Git failed to fetch the submodules from their respective remotes" "$process_status"
|
error 'git submodule foreach git fetch --all' "Git failed to fetch the submodules from their respective remotes" "$process_status"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -204,9 +204,9 @@ printf '%s' "$cbg_blue $c_reset$cbg_yellow + Remove untracked files:$c_reset"
|
||||||
process_status="$(git submodule foreach git clean -dxf 2>&1)"
|
process_status="$(git submodule foreach git clean -dxf 2>&1)"
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error 'git submodule foreach git clean -dxf' 'Git failed to remove untracked files' "$process_status"
|
error 'git submodule foreach git clean -dxf' 'Git failed to remove untracked files' "$process_status"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ fi
|
||||||
process_status="$(rm -rf "${plugin:?}")"
|
process_status="$(rm -rf "${plugin:?}")"
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
printf '%s\n' "$cbg_blue $c_reset$cbg_yellow = $cfg_white$plugin$c_reset"
|
printf '%s\n' "$cbg_blue $c_reset$cbg_yellow = $cfg_white_bold$plugin$c_reset"
|
||||||
else
|
else
|
||||||
error "rm -rf $plugin" "Folder couldn't be deleted" "$process_status"
|
error "rm -rf $plugin" "Folder couldn't be deleted" "$process_status"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -252,9 +252,9 @@ fi
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
if ! grep -q "Already up-to-date" <<< "$process_status"; then
|
if ! grep -q "Already up-to-date" <<< "$process_status"; then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
printf '%s\n' "$cfg_white UP TO DATE $c_reset"
|
printf '%s\n' "$cfg_white_bold UP TO DATE $c_reset"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
error 'git pull' "Failed pulling changes for $plugin" "$process_status"
|
error 'git pull' "Failed pulling changes for $plugin" "$process_status"
|
||||||
|
@ -277,10 +277,10 @@ type -P nvim >/dev/null && {
|
||||||
$timeout_command --preserve-status --foreground 1m nvim -c 'helptags ALL|qa!'
|
$timeout_command --preserve-status --foreground 1m nvim -c 'helptags ALL|qa!'
|
||||||
|
|
||||||
if (( ! $? )); then
|
if (( ! $? )); then
|
||||||
printf '%s\n' "$cfg_green SUCCESS! $c_reset"
|
printf '%s\n' "$cfg_green_bold SUCCESS! $c_reset"
|
||||||
else
|
else
|
||||||
reset -I
|
reset -I
|
||||||
printf '%s\n' "$cfg_red FAIL! $c_reset"
|
printf '%s\n' "$cfg_red_bold FAIL! $c_reset"
|
||||||
error "nvim -c 'helptags ALL|qa!'" 'Generating helpdocs for the submodules failed'
|
error "nvim -c 'helptags ALL|qa!'" 'Generating helpdocs for the submodules failed'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,13 @@ if has("gui_running") || &term != "linux" && &termguicolors
|
||||||
let g:cGray3 = '#6c6c6c'
|
let g:cGray3 = '#6c6c6c'
|
||||||
let g:cGray4 = '#4e4e4e'
|
let g:cGray4 = '#4e4e4e'
|
||||||
|
|
||||||
|
let g:cBlue = '#87d7ff'
|
||||||
let g:cRed = '#d75f5f'
|
let g:cRed = '#d75f5f'
|
||||||
let g:cYellow = '#ffd787'
|
let g:cYellow = '#ffd787'
|
||||||
let g:cBlue = '#87d7ff'
|
|
||||||
|
|
||||||
let g:cDarkRed = '#a34848'
|
let g:cDarkBlue = '#518199'
|
||||||
let g:cDarkYellow = '#ccac6c'
|
let g:cDarkRed = '#994444'
|
||||||
let g:cDarkBlue = '#6caccc'
|
let g:cDarkYellow = '#b0945d'
|
||||||
|
|
||||||
let g:cLightBg = '#303030'
|
let g:cLightBg = '#303030'
|
||||||
let g:cDarkBg = '#262626'
|
let g:cDarkBg = '#262626'
|
||||||
|
@ -26,13 +26,13 @@ elseif &t_Co >= 256 && &term != "linux"
|
||||||
let g:cGray3 = '242' "#6c6c6c
|
let g:cGray3 = '242' "#6c6c6c
|
||||||
let g:cGray4 = '239' "#4e4e4e
|
let g:cGray4 = '239' "#4e4e4e
|
||||||
|
|
||||||
|
let g:cBlue = '117' "#87d7ff
|
||||||
let g:cRed = '167' "#d75f5f
|
let g:cRed = '167' "#d75f5f
|
||||||
let g:cYellow = '222' "#ffd787
|
let g:cYellow = '222' "#ffd787
|
||||||
let g:cBlue = '117' "#87d7ff
|
|
||||||
|
|
||||||
|
let g:cDarkBlue = '74' "#5fafd7
|
||||||
let g:cDarkRed = '131' "#af5f5f
|
let g:cDarkRed = '131' "#af5f5f
|
||||||
let g:cDarkYellow = '179' "#d7af5f
|
let g:cDarkYellow = '179' "#d7af5f
|
||||||
let g:cDarkBlue = '74' "#5fafd7
|
|
||||||
|
|
||||||
let g:cLightBg = '236' "#303030
|
let g:cLightBg = '236' "#303030
|
||||||
let g:cDarkBg = '235' "#262626
|
let g:cDarkBg = '235' "#262626
|
||||||
|
@ -45,13 +45,13 @@ else
|
||||||
let g:cGray4 = '15' "#ffffff
|
let g:cGray4 = '15' "#ffffff
|
||||||
let g:cGray3 = '15' "#ffffff
|
let g:cGray3 = '15' "#ffffff
|
||||||
|
|
||||||
|
let g:cBlue = '12' "#0000ff
|
||||||
let g:cRed = '9' "#ff0000
|
let g:cRed = '9' "#ff0000
|
||||||
let g:cYellow = '11' "#ffff00
|
let g:cYellow = '11' "#ffff00
|
||||||
let g:cBlue = '12' "#0000ff
|
|
||||||
|
|
||||||
|
let g:cDarkBlue = '4' "#000080
|
||||||
let g:cDarkRed = '1' "#800000
|
let g:cDarkRed = '1' "#800000
|
||||||
let g:cDarkYellow = '3' "#808000
|
let g:cDarkYellow = '3' "#808000
|
||||||
let g:cDarkBlue = '4' "#000080
|
|
||||||
|
|
||||||
let g:cLightBg = '7' "#c0c0c0
|
let g:cLightBg = '7' "#c0c0c0
|
||||||
let g:cDarkBg = '0' "#000000
|
let g:cDarkBg = '0' "#000000
|
||||||
|
|
Loading…
Reference in a new issue