From 60d2fd2c71ad0206de8f3037f82419705f12d889 Mon Sep 17 00:00:00 2001 From: Silicasandwhich Date: Tue, 27 Jun 2023 19:37:08 -0400 Subject: [PATCH] chore: shfmt --- utils/installer/install.sh | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 76af3b10..a11e96f8 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -243,29 +243,26 @@ function validate_install_prefix() { local profile="$HOME/.profile" local user_shell="$(getent passwd $LOGNAME | cut -d: -f7)" case "${user_shell}" in - *"zsh"*) - profile="$HOME/.zshenv" - ;; - *"fish"*) - profile="$HOME/.config/fish/config.fish" - ;; + *"zsh"*) + profile="$HOME/.zshenv" + ;; + *"fish"*) + profile="$HOME/.config/fish/config.fish" + ;; esac if [ "$INTERACTIVE_MODE" -eq 1 ]; then - if confirm "$prefix/bin is not on your path. would you like to add it to $profile?"; then - echo "appending $prefix/bin to path" - if [ "${user_shell##*/}" = "fish" ]; then - echo "fish_add_path $prefix/bin" >> $profile - else - echo "export PATH=\$PATH:$prefix/bin" >> $profile - fi + if confirm "$prefix/bin is not on your path. would you like to add it to $profile?"; then + echo "appending $prefix/bin to path" + if [ "${user_shell##*/}" = "fish" ]; then + echo "fish_add_path $prefix/bin" >>$profile else - ADDITIONAL_WARNINGS="[WARN] the folder $prefix/bin is not on PATH, consider adding 'export PATH=$prefix/bin:\$PATH' to your $profile" + echo "export PATH=\$PATH:$prefix/bin" >>$profile fi + else + ADDITIONAL_WARNINGS="[WARN] the folder $prefix/bin is not on PATH, consider adding 'export PATH=$prefix/bin:\$PATH' to your $profile" fi - - - + fi # avoid problems when calling any verify_* function export PATH="$prefix/bin:$PATH" @@ -482,7 +479,6 @@ function create_desktop_file() { xdg-desktop-menu install --novendor "$LUNARVIM_BASE_DIR/utils/desktop/lvim.desktop" || true } - function print_logo() { cat <<'EOF'