66,8 → 66,7 |
|
# if there are no files with $EXT extension in the directory then quit |
ls -f *.$EXT > /dev/null 2>&1 |
[[ "$?" -ne 0 ]] && exit 1 |
|
if [ "$?" -eq 0 ]; then |
for i in *.$EXT; do |
echo "processing " $i |
PREFIX=`echo $i | cut -d $DELIM -f1,2` |
90,7 → 89,49 |
done |
|
echo -n "$OBSERVATORY$SLASH$YEAR$SLASH$MONTH$SLASH$DAY" > LAST |
else |
echo "No image files to sort" |
fi |
|
DIR="bolids" |
|
ls -f *.wav > /dev/null 2>&1 |
if [ "$?" -eq 0 ]; then |
for i in bolid_*.wav; do |
echo "processing bolid " $i |
|
PREFIX=`echo $i | cut -d $DELIM -f1,2` |
OBSERVATORY=`echo $PREFIX | cut -d $DELIM -f2` |
TIMESTAMP=`echo "$i" | cut -d $DELIM -f3` |
YEAR=20`echo "$TIMESTAMP" | cut -c 1-2` |
OUTDIR="$OBSERVATORY$SLASH$DIR$SLASH$YEAR" |
|
[[ -d "$OUTDIR" ]] || mkdir -p "$OUTDIR" |
mv $i "$OUTDIR" |
done |
else |
echo "No wav files to sort" |
fi |
|
ls -f *.aux > /dev/null 2>&1 |
if [ "$?" -eq 0 ]; then |
for i in bolid_*.aux; do |
echo "processing bolid metadata " $i |
|
PREFIX=`echo $i | cut -d $DELIM -f1,2` |
OBSERVATORY=`echo $PREFIX | cut -d $DELIM -f2` |
TIMESTAMP=`echo "$i" | cut -d $DELIM -f3` |
YEAR=20`echo "$TIMESTAMP" | cut -c 1-2` |
OUTDIR="$OBSERVATORY$SLASH$DIR$SLASH$YEAR" |
|
[[ -d "$OUTDIR" ]] || mkdir -p "$OUTDIR" |
mv $i "$OUTDIR" |
done |
else |
echo "No aux files to sort" |
fi |
|
exit 0 |
|
|
|