#!/usr/bin/env bash

module_description() { printf "Install Visual Studio Code\n"; }
module_required() { return 1; }
module_should_skip() { return 1; }
module_prereqs() { return 0; }

module_main() {
  log_info "Installing Visual Studio Code..."

  if pacman -Si code >/dev/null 2>&1; then
    install_pacman code
  elif pacman -Si visual-studio-code-bin >/dev/null 2>&1; then
    install_pacman visual-studio-code-bin
  else
    install_aur visual-studio-code-bin
  fi
}
