diff --git a/extra/extra.go b/extra/extra.go index b6de049..fe4cd91 100644 --- a/extra/extra.go +++ b/extra/extra.go @@ -146,7 +146,10 @@ func InstallExtraPackages(osType string, dirs *localio.Directories, packages *lo return err } fmt.Println("[+] Installing git-delta latest release") - if err = localio.RunCommandPipeOutput(fmt.Sprintf("sudo dpkg --no-pager -i %s", debPackage)); err != nil { + if err = localio.RunCommandPipeOutput(fmt.Sprintf("sudo dpkg --no-pager --force-depends -i %s", debPackage)); err != nil { + return err + } + if err = localio.RunCommandPipeOutput("sudo apt-get -y -q install -f"); err != nil { return err } } diff --git a/vim/vim.go b/vim/vim.go index 9fe4628..6e16c37 100644 --- a/vim/vim.go +++ b/vim/vim.go @@ -13,13 +13,13 @@ var myConfigs embed.FS // InstallVimPlugins ... func InstallVimPlugins(osType string, dirs *localio.Directories) error { - if exists, err := localio.Exists(fmt.Sprintf("%s/.vim_runtime", dirs.HomeDir)); err == nil && exists { - return nil - } - // install awesome vim - if err := localio.RunCommandPipeOutput(fmt.Sprintf("git clone --depth=1 https://github.com/amix/vimrc.git %s/.vim_runtime", dirs.HomeDir)); err != nil { - return err + if exists, err := localio.Exists(fmt.Sprintf("%s/.vim_runtime", dirs.HomeDir)); err == nil && !exists { + // install awesome vim + if err = localio.RunCommandPipeOutput(fmt.Sprintf("git clone --depth=1 https://github.com/amix/vimrc.git %s/.vim_runtime", dirs.HomeDir)); err != nil { + return err + } } + if err := localio.RunCommandPipeOutput(fmt.Sprintf("cd %s && bash .vim_runtime/install_awesome_vimrc.sh", dirs.HomeDir)); err != nil { return err } @@ -124,10 +124,6 @@ func InstallVimPlugins(osType string, dirs *localio.Directories) error { // InstallVimAwesome ... func InstallVimAwesome(osType string, dirs *localio.Directories, packages *localio.InstalledPackages) error { - if exists, err := localio.Exists(fmt.Sprintf("%s/.vim_runtime", dirs.HomeDir)); err == nil && exists { - return nil - } - switch osType { case "darwin": if !localio.CorrectOS("darwin") {