changeset 216:a869987c4646

did I say 'mess up'? Bugfix
author edhoprima@gmail.com <edhoprima@gmail.com>
date Thu, 02 Jul 2009 20:06:43 +0000
parents 710082ce6788
children 77cd21d714f6
files moefetch.sh
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/moefetch.sh	Thu Jul 02 20:01:13 2009 +0000
+++ b/moefetch.sh	Thu Jul 02 20:06:43 2009 +0000
@@ -167,7 +167,7 @@
 	test -O "${BASE_DIR}" || Err_Fatal "You don't own ${BASE_DIR}. Please fix ${BASE_DIR} or run this script in your own directory."
 	for directory in temp trash deleted "${SITE_DIR}/${TARGET_DIR}"; do
 		if [ ! -d "${BASE_DIR}/${directory}" ]; then
-			mkdir "${BASE_DIR}/${directory}" || Err_Impossible
+			mkdir -p "${BASE_DIR}/${directory}" || Err_Impossible
 		fi
 		if [ ! -O "${BASE_DIR}/${directory}" ]; then
 			echo "You don't own the ${BASE_DIR}/${directory}, applying globally writeable permission on it"
@@ -190,7 +190,7 @@
 	trashes="These files have been moved to ${trash_dir}:"
 	has_trash=
 	if test ! -d "${trash_dir}"; then
-		mkdir -p "${BASE_DIR}/trash/${trash_dir}" || Err_Impossible
+		mkdir -p "${trash_dir}" || Err_Impossible
 	else
 		if test ! -o "${trash_dir}"; then
 			chmod -R u=rwX,g=rwX,o=rwX "${BASE_DIR}/${directory}" || Err_Impossible
@@ -210,7 +210,7 @@
 	done
 	rmdir "${trash_dir}" 2>/dev/null
 	Progress_Done
-	test -z "${has_trash}" || echo "${trashes}"
+	test -z "${has_trash}" && echo "${trashes}"
 }
 
 # check files correctness