Commit f91d0e65 authored by nanahira's avatar nanahira

add more error texts

parent 792ce187
...@@ -53,7 +53,7 @@ process_repo() { ...@@ -53,7 +53,7 @@ process_repo() {
if [ ! -d "workspace/$repo_identifer" ]; then if [ ! -d "workspace/$repo_identifer" ]; then
echo "Failed to clone $repo_url" echo "Failed to clone $repo_url"
echo "[ERROR] $repo_url Failed to clone" >> dist/warnings.txt echo "[ERROR] $repo_url Failed to clone" | tee dist/warnings.txt
return return
fi fi
...@@ -62,7 +62,7 @@ process_repo() { ...@@ -62,7 +62,7 @@ process_repo() {
echo "Checking size of $repo_identifer: $size MB" echo "Checking size of $repo_identifer: $size MB"
if [[ $size > $SIZE_LIMIT_MB ]]; then if [[ $size > $SIZE_LIMIT_MB ]]; then
echo "Skipping $repo_identifer due to oversize: $size MB > $SIZE_LIMIT_MB MB" echo "Skipping $repo_identifer due to oversize: $size MB > $SIZE_LIMIT_MB MB"
echo "[ERROR] $repo_url Oversize: $size MB > $SIZE_LIMIT_MB MB" >> dist/warnings.txt echo "[ERROR] $repo_url Oversize: $size MB > $SIZE_LIMIT_MB MB" | tee dist/warnings.txt
return return
fi fi
...@@ -79,7 +79,7 @@ process_repo() { ...@@ -79,7 +79,7 @@ process_repo() {
if [ $((CURRENT_TIME - last_commit_timestamp)) -gt $((KEEP_PERIOD_DAYS * 24 * 60 * 60)) ]; then if [ $((CURRENT_TIME - last_commit_timestamp)) -gt $((KEEP_PERIOD_DAYS * 24 * 60 * 60)) ]; then
echo "Skipping $repo_identifer due to outdated: $((CURRENT_TIME - last_commit_timestamp)) > $((KEEP_PERIOD_DAYS * 24 * 60 * 60))" echo "Skipping $repo_identifer due to outdated: $((CURRENT_TIME - last_commit_timestamp)) > $((KEEP_PERIOD_DAYS * 24 * 60 * 60))"
cd "$current_path" cd "$current_path"
echo "[ERROR] $repo_url Outdated: $((CURRENT_TIME - last_commit_timestamp)) > $((KEEP_PERIOD_DAYS * 24 * 60 * 60))" >> dist/warnings.txt echo "[ERROR] $repo_url Outdated: $((CURRENT_TIME - last_commit_timestamp)) > $((KEEP_PERIOD_DAYS * 24 * 60 * 60))" | tee dist/warnings.txt
return return
fi fi
...@@ -92,7 +92,7 @@ process_repo() { ...@@ -92,7 +92,7 @@ process_repo() {
if [ -n "${blacklist_files[$file]}" ]; then if [ -n "${blacklist_files[$file]}" ]; then
echo "Skipping $repo_identifer due to blacklist file $file" echo "Skipping $repo_identifer due to blacklist file $file"
cd "$current_path" cd "$current_path"
echo "[ERROR] $repo_url Blacklist file: $file" >> dist/warnings.txt echo "[ERROR] $repo_url Blacklist file: $file" | tee dist/warnings.txt
return return
fi fi
done < <(find .) done < <(find .)
...@@ -107,7 +107,7 @@ process_repo() { ...@@ -107,7 +107,7 @@ process_repo() {
fi fi
if [ -n "${ocg_codes[$code]}" ]; then if [ -n "${ocg_codes[$code]}" ]; then
echo "Skipping $repo_identifer due to using OCG code $code" echo "Skipping $repo_identifer due to using OCG code $code"
echo "[ERROR] $repo_url Using OCG code: $code" >> dist/warnings.txt echo "[ERROR] $repo_url Using OCG code: $code" | tee dist/warnings.txt
return return
fi fi
done < <(ls -1 workspace/$repo_identifer/*.cdb | xargs -I '{}' sqlite3 '{}' 'select id from datas;') done < <(ls -1 workspace/$repo_identifer/*.cdb | xargs -I '{}' sqlite3 '{}' 'select id from datas;')
...@@ -139,7 +139,7 @@ process_repo() { ...@@ -139,7 +139,7 @@ process_repo() {
if [ $redtext_line_count -gt 0 ]; then if [ $redtext_line_count -gt 0 ]; then
echo "Skipping $repo_identifer due to redtexts" echo "Skipping $repo_identifer due to redtexts"
echo "[ERROR] $repo_url $redtext_line_count Redtexts found" >> dist/warnings.txt echo "[ERROR] $repo_url $redtext_line_count Redtexts found" | tee dist/warnings.txt
return return
fi fi
rm dist/redtexts/$repo_identifer.txt rm dist/redtexts/$repo_identifer.txt
...@@ -153,7 +153,7 @@ process_repo() { ...@@ -153,7 +153,7 @@ process_repo() {
fi fi
if [ -n "${used_codes[$code]}" ]; then if [ -n "${used_codes[$code]}" ]; then
echo "Code $code in $repo_url is already used in ${used_codes[$code]}" echo "Code $code in $repo_url is already used in ${used_codes[$code]}"
echo "[WARNING] CODE CONFLICT: [$code] in ${used_codes[$code]} vs $repo_url" >> dist/warnings.txt echo "[WARNING] CODE CONFLICT: [$code] in ${used_codes[$code]} vs $repo_url" | tee dist/warnings.txt
else else
used_codes[$code]="$repo_url" used_codes[$code]="$repo_url"
fi fi
......
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