#! /usr/bin/env bash

if [[ $# -lt 2 ]]; then
   echo "Error: You must pass the directory with the scripts and partition"
   echo "you want to run to "
   echo "example $ enqueueAll.sh ./hpc/Q23 batch"
   echo "example $ enqueueAll.sh ./hpc/Q20 rome"
   exit 1;
fi

# Enqueue
for file in $(ls $1); do
  echo "sbatch -p $2 --qos=small $file";
  eval "sbatch -p $2 --qos=small $file";
done
