#!/bin/bash

mkdir -p to_be_restored

move_file()
{
    to_be_restored_file=`echo $1 | sed -r 's/[//]/_/g'`
    echo "Moving $1 to ./to_be_restored/$to_be_restored_file"

    mv $1 ./to_be_restored/$to_be_restored_file 
}

restore_file()
{
    to_be_restored_file=`echo $1 | sed -r 's/[//]/_/g'`
    echo "Moving ./to_be_restored/$to_be_restored_file/* to $1"

    cp ./to_be_restored/$to_be_restored_file/* $1
}

restore_file TEMPO_CLDO4_L2_V03/2025/04/15
restore_file TEMPO_CLDO4_L2_V03/2025/04/16

restore_file TEMPO_CLDO4_L3_V03/2025/04/15
restore_file TEMPO_CLDO4_L3_V03/2025/04/16

restore_file TEMPO_HCHO_L2_V03/2025/04/15
restore_file TEMPO_HCHO_L2_V03/2025/04/16

restore_file TEMPO_HCHO_L3_V03/2025/04/15
restore_file TEMPO_HCHO_L3_V03/2025/04/16

restore_file TEMPO_NO2_L2_V03/2025/04/15
restore_file TEMPO_NO2_L2_V03/2025/04/16

restore_file TEMPO_NO2_L3_V03/2025/04/15
restore_file TEMPO_NO2_L3_V03/2025/04/16

restore_file TEMPO_O3TOT_L2_V03/2025/04/15
restore_file TEMPO_O3TOT_L2_V03/2025/04/16 

restore_file TEMPO_O3TOT_L3_V03/2025/04/15
restore_file TEMPO_O3TOT_L3_V03/2025/04/16
