diff moefetch.sh @ 161:52877e2849bb

misc fix. These past commits wasn't actually tested
author edhoprima@gmail.com <edhoprima@gmail.com>
date Fri, 05 Jun 2009 19:15:36 +0000
parents 68227a30d0b3
children 1f937c2e8b3f
line wrap: on
line diff
--- a/moefetch.sh	Fri Jun 05 19:09:54 2009 +0000
+++ b/moefetch.sh	Fri Jun 05 19:15:36 2009 +0000
@@ -130,7 +130,7 @@
 	# let's move to workdir
 	cd "${BASE_DIR}/temp"
 	for i in error ok list newlist; do
-		touch "${TARGET_DIR}-${i}" || Fatal_Err "Error creating ${TARGET_DIR}-${i}. This shouldn't happen"
+		touch "${SITE_DIR}-${TARGET_DIR}-${i}" || Fatal_Err "Error creating ${TARGET_DIR}-${i}. This shouldn't happen"
 	done
 	#
 }
@@ -241,7 +241,7 @@
 			SITE="$1"
 		;;
 		*)
-			SITE=DEFAULT_SITE
+			SITE="${DEFAULT_SITE}"
 		;;
 	esac
 	shift
@@ -249,7 +249,7 @@
 	echo "Tags: ${TAGS}"
 	# slash is not wanted for folder name
 	TARGET_DIR=`echo "${TAGS}" | sed -e 's/\//_/g'`
-	SITE_DIR=`echo "${SITE}" | sed -e 's/\//_/g'`
+	SITE_DIR=`echo "${SITE}" | sed -e 's/\/$//g;s/\//_/g'`
 }
 
 Msg_Welcome