comparison moefetch.sh @ 178:3f5ee8b2791f

error when restructuring
author edhoprima@gmail.com <edhoprima@gmail.com>
date Fri, 05 Jun 2009 20:41:40 +0000
parents 4d7de9c3b98c
children c132eb3ca841
comparison
equal deleted inserted replaced
177:4d7de9c3b98c 178:3f5ee8b2791f
170 echo "Error: ${FILE}" 170 echo "Error: ${FILE}"
171 fi 171 fi
172 printf "." 172 printf "."
173 done 173 done
174 echo 174 echo
175 175 TOTAL_ERROR=`echo \`wc -l < "${BASE_DIR}/temp/${SITE_DIR}-${TARGET_DIR}-error"\``
176 # back to target dir 176 echo "${TOTAL_ERROR} file(s) error"
177 cd "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}"
178
179 echo "Removing error files" 177 echo "Removing error files"
180 if [ "${TOTAL_ERROR}" -eq 0 ]; then 178 if [ "${TOTAL_ERROR}" -eq 0 ]; then
181 echo "No error file. 0 file removed" 179 echo "No error file. 0 file removed"
182 else 180 else
183 cat "${BASE_DIR}/temp/${SITE_DIR}-${TARGET_DIR}-error" | xargs rm 181 cat "${BASE_DIR}/temp/${SITE_DIR}-${TARGET_DIR}-error" | xargs rm
185 fi 183 fi
186 echo "`echo \`ls | wc -l\`` file(s) available locally" 184 echo "`echo \`ls | wc -l\`` file(s) available locally"
187 185
188 # current dir: ${BASE_DIR}/temp 186 # current dir: ${BASE_DIR}/temp
189 cd ${BASE_DIR}/temp 187 cd ${BASE_DIR}/temp
190 TOTAL_ERROR=`echo \`wc -l < "${SITE_DIR}-${TARGET_DIR}-error"\``
191 echo "${TOTAL_ERROR} file(s) error"
192 188
193 echo "Generating list of new files..." 189 echo "Generating list of new files..."
194 # THE FILES 190 # THE FILES
195 #ls "../${TARGET_DIR}" | grep -vf "${TARGET_DIR}-error" > "${TARGET_DIR}-ok" 191 #ls "../${TARGET_DIR}" | grep -vf "${TARGET_DIR}-error" > "${TARGET_DIR}-ok"
196 # 192 #