comparison moefetch.sh @ 194:a8da49424468

proper way to empty file
author edhoprima@gmail.com <edhoprima@gmail.com>
date Mon, 29 Jun 2009 10:54:33 +0000
parents ac6533a8fb51
children 652d9e268cee
comparison
equal deleted inserted replaced
193:ac6533a8fb51 194:a8da49424468
188 Check_Files() { 188 Check_Files() {
189 if [ ! "${ISNEW}" ]; then 189 if [ ! "${ISNEW}" ]; then
190 [ "${NOCLEAN}" ] || Cleanup_Repository 190 [ "${NOCLEAN}" ] || Cleanup_Repository
191 echo "Checking for errors..." 191 echo "Checking for errors..."
192 cd "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}" 192 cd "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}"
193 printf "" > "${BASE_DIR}/temp/${SITE_DIR}-${TARGET_DIR}-error" 193 > "${BASE_DIR}/temp/${SITE_DIR}-${TARGET_DIR}-error"
194 for FILE in * 194 for FILE in *
195 do 195 do
196 if [ "$(echo "${FILE}" | sed -e 's/\([0-9a-f]\{32\}\..*\)//g' | grep -v ^$)" ]; then 196 if [ "$(echo "${FILE}" | sed -e 's/\([0-9a-f]\{32\}\..*\)//g' | grep -v ^$)" ]; then
197 echo 197 echo
198 echo "Not a valid danbooru file: ${FILE}" 198 echo "Not a valid danbooru file: ${FILE}"