#! /bin/bash

LIBDIR=/usr/share/manjaro-arm-tools/lib
source $LIBDIR/functions.sh

# Check for root
check_root

# Available options
opt="fhp"

while getopts "${opt}" arg; do
  case $arg in
    f)
      echo "Forcing git update..."
      rm -rf $PROFILES/arm-profiles
      ;;
    p)
      echo "Using branch 'pp-factory'..."
      FACTORY=true
      ;;
    \?)
      echo "Invalid option: -${OPTARG}"
      exit 1
      ;;
    h|?)
      usage_getarmprofiles
      exit 1
      ;;
    :)
      echo "Option -${OPTARG} requires an argument, aborting"
      exit 1
      ;;
  esac
done

get_profiles
