changeset 204:fb02adf58c00

cleanup. speed
author edhoprima@gmail.com <edhoprima@gmail.com>
date Mon, 29 Jun 2009 16:46:59 +0000
parents 94a585031e3b
children 2e866999c042
files moefetch.sh
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/moefetch.sh	Mon Jun 29 16:36:16 2009 +0000
+++ b/moefetch.sh	Mon Jun 29 16:46:59 2009 +0000
@@ -159,7 +159,7 @@
 	# THE FILES
 	
 	# current dir: ${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}
-	echo "Cleaning up repository folder..."
+	printf "Cleaning up repository folder"
 	TRASH_DIR=$(date -u "+${SITE_DIR}-${TARGET_DIR}-%Y%m%d-%H.%M")
 	mkdir -p "${BASE_DIR}/trash/${TRASH_DIR}" || Err_Fatal "Unable to create trash folder"
 	for TRASH in "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/"*
@@ -178,16 +178,17 @@
 			mv -f "${TRASH}" "${BASE_DIR}/trash/${TRASH_DIR}" || Err_Fatal "Error deleting files"
 			echo "Moved $(echo "${TRASH}" | sed -e "${SED_GET_FILENAME}") to ${BASE_DIR}/trash/${TRASH_DIR}"
 		fi
+		printf "."
 	done
+	echo "done"
 	rmdir "${BASE_DIR}/trash/${TRASH_DIR}" 2>/dev/null
-	
 }
 
 # check files correctness
 Check_Files() {
 	if [ ! "${ISNEW}" ]; then
 		[ "${NOCLEAN}" ] || Cleanup_Repository
-		printf "Checking for errors..."
+		printf "Checking for errors"
 		> "${TEMP_PREFIX}-error"
 		for FILE in "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/"*
 		do
@@ -203,7 +204,7 @@
 				printf "."
 			fi
 		done
-		echo " done"
+		echo "done"
 		TOTAL_ERROR=$(echo $(wc -l < "${TEMP_PREFIX}-error"))
 		if [ "${TOTAL_ERROR}" -eq 0 ]; then
 			echo "All files OK"