#!/bin/bash

# process arguments "$1", "$2", ... (i.e. "$@")
while getopts "p:" opt; do
    case $opt in
    p) pr=$OPTARG ;; # Handle -b argument
    \?) ;; # Handle error: unknown option or missing required argument.
    esac
done
shift $(expr $OPTIND - 1 )

if [ -z "$pr" ]
then
  echo "Running current master"
  ~/bin/current/eagle/saved_game_utils $1
else
  echo "Running pr $pr"
  ~/bin/deploy/pr/"$pr"/eagle/saved_game_utils $1
fi
