mirror of
https://github.com/DaoCloud/public-image-mirror.git
synced 2025-08-07 20:54:52 +08:00
Add check image (#345)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user