comparison moefetch.sh @ 192:47efb7a23425

blargh. It's getting annoying
author edhoprima@gmail.com <edhoprima@gmail.com>
date Sun, 28 Jun 2009 17:20:46 +0000
parents a4ceb952b05a
children ac6533a8fb51
comparison
equal deleted inserted replaced
191:a4ceb952b05a 192:47efb7a23425
161 ISTRASH=1 161 ISTRASH=1
162 else 162 else
163 if [ "$(echo "${FILE}" | sed -e 's/.*\/\([\^\/]*\)/\1/g;s/\([0-9a-f]\{32\}.*\)//g' | grep -v ^$)" ]; then 163 if [ "$(echo "${FILE}" | sed -e 's/.*\/\([\^\/]*\)/\1/g;s/\([0-9a-f]\{32\}.*\)//g' | grep -v ^$)" ]; then
164 ISTRASH=1 164 ISTRASH=1
165 else 165 else
166 [ "$(cat "${BASE_DIR}/temp/${TARGET_DIR}-list" | sed -e 's/.*\/\([^\/]*\)/\1/g' | grep $(echo "${TRASH}" | sed -e 's/.*\/\([^\/]*\)/\1/g'))" ] || ISTRASH=1 166 [ "$(cat "${BASE_DIR}/temp/${SITE_DIR}-${TARGET_DIR}-list" | sed -e 's/.*\/\([^\/]*\)/\1/g' | grep $(echo "${TRASH}" | sed -e 's/.*\/\([^\/]*\)/\1/g'))" ] || ISTRASH=1
167 fi 167 fi
168 fi 168 fi
169 if [ "${ISTRASH}" ]; then 169 if [ "${ISTRASH}" ]; then
170 mv -f "${TRASH}" "${BASE_DIR}/trash/${TRASH_DIR}" || Err_Fatal "Error deleting files" 170 mv -f "${TRASH}" "${BASE_DIR}/trash/${TRASH_DIR}" || Err_Fatal "Error deleting files"
171 echo "Moved ${TRASH} to ${BASE_DIR}/trash/${TRASH_DIR}" 171 echo "Moved ${TRASH} to ${BASE_DIR}/trash/${TRASH_DIR}"