comparison moefetch.sh @ 217:77cd21d714f6

screwup fix
author edhoprima@gmail.com <edhoprima@gmail.com>
date Thu, 02 Jul 2009 20:25:27 +0000
parents a869987c4646
children aeca29670e26
comparison
equal deleted inserted replaced
216:a869987c4646 217:77cd21d714f6
225 has_err_md5= 225 has_err_md5=
226 > "${TEMP_PREFIX}-error" 226 > "${TEMP_PREFIX}-error"
227 > "${TEMP_PREFIX}-ok" 227 > "${TEMP_PREFIX}-ok"
228 for file in "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/"* 228 for file in "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/"*
229 do 229 do
230 if test -n "$(Is_NotMD5 "$(basename "${file}")")" || test -d "${file}"; then 230 if test "${file}" != "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/*"; then
231 files_notdanbooru="${files_notdanbooru} 231 if test -n "$(Is_NotMD5 "$(basename "${file}")")" || test -d "${file}"; then
232 $(basename "${file}")" 232 files_notdanbooru="${files_notdanbooru}
233 has_err_filename=1 233 $(basename "${file}")"
234 else 234 has_err_filename=1
235 if test "$(${MD5} "${file}" | cut -d ' ' -f1 -)" = "$(basename "${file}" | cut -d '.' -f1)"; then
236 echo "$(basename "${file}")" >> "${TEMP_PREFIX}-ok"
237 else 235 else
238 rm "${file}" || Err_Fatal "Error removing ${file}" 236 if test "$(${MD5} "${file}" | cut -d ' ' -f1 -)" = "$(basename "${file}" | cut -d '.' -f1)"; then
239 echo "$(basename "${file}")" >> "${TEMP_PREFIX}-error" 237 echo "$(basename "${file}")" >> "${TEMP_PREFIX}-ok"
240 files_error="${files_error} 238 else
241 $(basename "${file}")" 239 rm "${file}" || Err_Fatal "Error removing ${file}"
242 has_err_md5=1 240 echo "$(basename "${file}")" >> "${TEMP_PREFIX}-error"
241 files_error="${files_error}
242 $(basename "${file}")"
243 has_err_md5=1
244 fi
243 fi 245 fi
244 fi 246 fi
245 Progress_Anim 247 Progress_Anim
246 done 248 done
247 Progress_Done 249 Progress_Done