"lwt" # Lake Washington Institute of Technology
);
+# Which codes to process in this iteration of the script.
+CODES_TO_PROCESS=();
+
# Hard-code the districts eligible for automatic teacher account processing.
# College teacher accounts are processed the same as school teacher accounts.
TEACHER_DISTRICTS=(
# only process the requested district if specified
if [ -n "$DISTRICT_CODE" ]; then
- DISTRICT_CODES=($DISTRICT_CODE);
+ CODES_TO_PROCESS=($DISTRICT_CODE);
+else
+ CODES_TO_PROCESS=("${DISTRICT_CODES[@]}" "${COLLEGE_CODES[@]}");
fi;
announce "Connecting to server $SERVER"
announce "Processing files on DB $DB_HOST"
fi
-for code in "${DISTRICT_CODES[@]}" "${COLLEGE_CODES[@]}"; do
+for code in "${CODES_TO_PROCESS[@]}"; do
COMMAND="$SERVER_AGENT -d $code";
COMPLETE_DIR="/home/sftp$code/complete"