#!/bin/env sh

installPackages() {
  packages=$@

  if command -v yay >/dev/null; then
    echo " using yay"
    yay -S --needed $packages
  elif command -v apt >/dev/null; then
    echo " using apt"
    apt install $packages
  else
    echo "... no supported package manager found. exiting"
    exit 1
  fi
}

updateSystem() {
  if command -v yay >/dev/null; then
    echo " using yay"
    yay
  elif command -v apt >/dev/null; then
    echo " using apt"
    apt update
  else
    echo "... no supported package manager found. exiting"
    exit 1
  fi
}
