Mercurial > ec-dotfiles
comparison moefetch.sh @ 209:dbbc4759c285
more aesthetics fix
author | edhoprima@gmail.com <edhoprima@gmail.com> |
---|---|
date | Mon, 29 Jun 2009 17:15:12 +0000 |
parents | 92505dfbb346 |
children | 3983d230467d |
comparison
equal
deleted
inserted
replaced
208:92505dfbb346 | 209:dbbc4759c285 |
---|---|
192 [ "$(cat "${TEMP_PREFIX}-list" | sed -e "${SED_GET_FILENAME}" | grep $(echo "${TRASH}" | sed -e "${SED_GET_FILENAME}"))" ] || ISTRASH=1 | 192 [ "$(cat "${TEMP_PREFIX}-list" | sed -e "${SED_GET_FILENAME}" | grep $(echo "${TRASH}" | sed -e "${SED_GET_FILENAME}"))" ] || ISTRASH=1 |
193 fi | 193 fi |
194 fi | 194 fi |
195 if [ "${ISTRASH}" ]; then | 195 if [ "${ISTRASH}" ]; then |
196 mv -f "${TRASH}" "${BASE_DIR}/trash/${TRASH_DIR}" || Err_Fatal "Error deleting files" | 196 mv -f "${TRASH}" "${BASE_DIR}/trash/${TRASH_DIR}" || Err_Fatal "Error deleting files" |
197 printf "\nMoved $(echo "${TRASH}" | sed -e "${SED_GET_FILENAME}") to ${BASE_DIR}/trash/${TRASH_DIR}\n${_last}" | 197 printf "\bMoved $(echo "${TRASH}" | sed -e "${SED_GET_FILENAME}") to ${BASE_DIR}/trash/${TRASH_DIR}\n${_last}" |
198 fi | 198 fi |
199 Progress_Anim | 199 Progress_Anim |
200 done | 200 done |
201 rmdir "${BASE_DIR}/trash/${TRASH_DIR}" 2>/dev/null | 201 rmdir "${BASE_DIR}/trash/${TRASH_DIR}" 2>/dev/null |
202 Progress_Done | 202 Progress_Done |
210 Progress_Init | 210 Progress_Init |
211 > "${TEMP_PREFIX}-error" | 211 > "${TEMP_PREFIX}-error" |
212 for FILE in "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/"* | 212 for FILE in "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/"* |
213 do | 213 do |
214 if [ "$(echo "${FILE}" | sed -e "${SED_GET_FILENAME};${SED_IS_MD5_FILE}" | grep -v ^$)" ]; then | 214 if [ "$(echo "${FILE}" | sed -e "${SED_GET_FILENAME};${SED_IS_MD5_FILE}" | grep -v ^$)" ]; then |
215 printf "\nNot a valid danbooru file: $(echo ${FILE} | sed -e "${SED_GET_FILENAME}")\n${_last}" | 215 printf "\bNot a valid danbooru file: $(echo ${FILE} | sed -e "${SED_GET_FILENAME}")\n${_last}" |
216 else | 216 else |
217 if [ "$(${MD5} "${FILE}" | cut -d ' ' -f1 -)" != "$(echo "${FILE}" | sed -e "${SED_GET_FILENAME}" | cut -d '.' -f1)" ] | 217 if [ "$(${MD5} "${FILE}" | cut -d ' ' -f1 -)" != "$(echo "${FILE}" | sed -e "${SED_GET_FILENAME}" | cut -d '.' -f1)" ] |
218 then | 218 then |
219 echo "${FILE}" >> "${TEMP_PREFIX}-error" | 219 echo "${FILE}" >> "${TEMP_PREFIX}-error" |
220 echo | 220 echo |
221 printf "\nError: $(echo "${FILE}" | sed -e "${SED_GET_FILENAME}")\n${_last}" | 221 printf "\bError: $(echo "${FILE}" | sed -e "${SED_GET_FILENAME}")\n${_last}" |
222 fi | 222 fi |
223 Progress_Anim | 223 Progress_Anim |
224 fi | 224 fi |
225 done | 225 done |
226 Progress_Done | 226 Progress_Done |