#!/bin/bash

project_dir="chemba"

# Parse command line arguments
for arg in "$@"; do
    case $arg in
        --project_dir=*)
            project_dir="${arg#*=}"
            ;;
        *)
            echo "Unknown option: $arg"
            exit 1
            ;;
    esac
    shift
done


# Check if required arguments are set
if  [ -z "$project_dir" ]; then
    echo "Missing argument project_dir. Use: interpolate_growth_model.sh --project_dir=chemba"
    exit 1
fi

echo interpolate_growth_model.R  $project_dir

cd ../r_app
Rscript interpolate_growth_model.R $project_dir