#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LOG="$DIR/$(date +%FT%T).log"

start=$SECONDS

sudo chmod -R a+rw ./input
sudo -u www-data ./upload_assignment --input-dir='./input' --assignment-id=<assignment-id> --device-id='<device-id>' 1>>$LOG 2>>$LOG

echo $(( SECONDS - start )) >> $LOG
