32 lines
714 B
Bash
32 lines
714 B
Bash
#!/bin/bash
|
|
# Run ci_extraction.R
|
|
# Usage: ./02_run_ci_extraction.sh --end_date=<YYYY-MM-DD> --offset=<days> --project_dir=kibos
|
|
|
|
end_date=$(date +'%Y-%m-%d')
|
|
offset=28
|
|
project_dir="kibos"
|
|
|
|
for arg in "$@"; do
|
|
case $arg in
|
|
--end_date=*)
|
|
end_date="${arg#*=}"
|
|
;;
|
|
--offset=*)
|
|
offset="${arg#*=}"
|
|
;;
|
|
--project_dir=*)
|
|
project_dir="${arg#*=}"
|
|
;;
|
|
*)
|
|
echo "Unknown option: $arg"
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
echo "Running ci_extraction.R for $project_dir with end_date $end_date and offset $offset."
|
|
cd r_app
|
|
Rscript 02_ci_extraction.R $end_date $offset $project_dir
|
|
cd ..
|