Commit 792ce187 authored by nanahira's avatar nanahira

add more warnings

parent 7cf4c785
...@@ -53,6 +53,7 @@ process_repo() { ...@@ -53,6 +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
return return
fi fi
...@@ -61,6 +62,7 @@ process_repo() { ...@@ -61,6 +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
return return
fi fi
...@@ -77,6 +79,7 @@ process_repo() { ...@@ -77,6 +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
return return
fi fi
...@@ -89,6 +92,7 @@ process_repo() { ...@@ -89,6 +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
return return
fi fi
done < <(find .) done < <(find .)
...@@ -103,6 +107,7 @@ process_repo() { ...@@ -103,6 +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
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;')
...@@ -134,6 +139,7 @@ process_repo() { ...@@ -134,6 +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
return return
fi fi
rm dist/redtexts/$repo_identifer.txt rm dist/redtexts/$repo_identifer.txt
...@@ -147,7 +153,7 @@ process_repo() { ...@@ -147,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 "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" >> 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