Add check image (#345)

This commit is contained in:
Shiming Zhang
2023-08-28 14:50:18 +08:00
committed by GitHub
parent 3b9f66d13f
commit c018ffeee5
3 changed files with 23 additions and 14 deletions

View File

@@ -4,11 +4,14 @@ file=$1
patch_url=$2
cp "${file}" "${file}.bak"
git apply -R <(curl -fsSL "${patch_url}") || :
list=$(diff --unified "${file}" "${file}.bak" | grep '^+\w' | sed 's/^+//' || :)
list=""
if [[ "${patch_url}" == "" ]]; then
list=$(cat "${file}")
else
cp "${file}" "${file}.bak"
git apply -R <(curl -fsSL "${patch_url}") || :
list=$(diff --unified "${file}" "${file}.bak" | grep '^+\w' | sed 's/^+//' || :)
fi
failed=()
for image in ${list}; do