Rev 2730 Rev 2787
Line 83... Line 83...
83 DAYDIR="$OBSERVATORY$SLASH$YEAR$SLASH$MONTH$SLASH$DAY$SLASH$HOUR" 83 DAYDIR="$OBSERVATORY$SLASH$YEAR$SLASH$MONTH$SLASH$DAY$SLASH$HOUR"
84 84
85 # create directory with observatory name, year, month and day if hasn't existed before 85 # create directory with observatory name, year, month and day if hasn't existed before
86 [[ -d "$DAYDIR" ]] || mkdir -p "$DAYDIR" 86 [[ -d "$DAYDIR" ]] || mkdir -p "$DAYDIR"
87 87
-   88 # check if directory really exists (if fs is full it might not be created)
88 mv "$i" "$DAYDIR" 89 [[ -d "$DAYDIR" ]] && mv "$i" "$DAYDIR"
89 done 90 done
90 91
91 echo -n "$OBSERVATORY$SLASH$YEAR$SLASH$MONTH$SLASH$DAY" > LAST 92 echo -n "$OBSERVATORY$SLASH$YEAR$SLASH$MONTH$SLASH$DAY" > LAST
92 else 93 else
93 echo "No image files to sort" 94 echo "No image files to sort"