Commit 995a2207 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

L2

parent 6b106580
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
INPUTDIR=$1 #Top directory with a L1C Subirectory INPUTDIR=$1 #Top directory with a L1C Subirectory
#OUTPUTDIR=$3 #L2A directory #OUTPUTDIR=$3 #L2A directory
echo $PWD
echo $OLDPWD
echo $INPUTDIR
cd $INPUTDIR/L1C cd $INPUTDIR/L1C
if [ ! -d ../L2A ]; then if [ ! -d ../L2A ]; then
...@@ -16,16 +13,21 @@ for f in $(find . -type f -name '*.zip') ...@@ -16,16 +13,21 @@ for f in $(find . -type f -name '*.zip')
do do
cd $INPUTDIR/L2A cd $INPUTDIR/L2A
echo $f echo $f
# unzip ../L1C/$f Z1=$(echo $f | cut -d "_" -f1)
DIRNAME=$(echo $f | cut -d "." -f1,2) Z2=$(echo $f | cut -d "_" -f3,4,5,6,7 | cut -d "." -f1)
echo $DIRNAME
L2A_Process $DIRNAME.SAFE
L2A=$(ls -d S2*_MSIL2A* -t |head -1)
L2A=$(echo $L2A | cut -d "." -f1)
zip -r $L2A.zip $L2A.SAFE/
break
rm -r *.SAFE
ZIPFILE=$Z1_MSIL2A_$Z2.zip
if [ ! -e $ZIPFILE ]; then
unzip ../L1C/$f
DIRNAME=$(echo $f | cut -d "." -f1,2)
echo $DIRNAME
L2A_Process $DIRNAME.SAFE
L2A=$(ls -d S2*_MSIL2A* -t |head -1)
L2A=$(echo $L2A | cut -d "." -f1)
zip -r $L2A.zip $L2A.SAFE/
break
# rm -r *.SAFE
fi
cd $INPUTDIR/L1C cd $INPUTDIR/L1C
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment