Commit f664b92b authored by nanahira's avatar nanahira

fix

parent 80664593
......@@ -12,6 +12,7 @@ echo '# Auto generated by ygopro-custom-free' > dist/strings.conf
CURRENT_TIME=$(date +%s)
something_changed=0
process_repo() {
repo_url="$1"
......@@ -58,9 +59,10 @@ process_repo() {
# fetch previous hash
previous_hash=$(curl -sL "https://cdn02.moecube.com:444/ygopro-custom-free/content/hashes/$repo_identifer.txt" || true)
if [[ $previous_hash != $last_commit_hash ]]; then
something_changed=1
current_something_changed=1
echo "Detected changes in $repo_identifer: $previous_hash -> $last_commit_hash"
else
current_something_changed=0
echo "No changes detected in $repo_identifer: $last_commit_hash"
fi
......@@ -96,6 +98,10 @@ process_repo() {
cp -rf workspace/$repo_identifer/script dist/
echo "$last_commit_hash" > dist/hashes/$repo_identifer.txt
if [[ $current_something_changed == 1 ]]; then
something_changed=1
fi
echo "Finished processing $repo_identifer"
}
......@@ -107,7 +113,7 @@ for file in repos/*.txt; do
done < "$file"
done
if [ -z $something_changed ]; then
if [[ $something_changed == 0 ]]; then
echo "No changes detected, skipping update"
exit 1
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