comparison 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
comparison
equal deleted inserted replaced
160:68227a30d0b3 161:52877e2849bb
128 done 128 done
129 [ `echo \`ls "${BASE_DIR}/${TARGET_DIR}" | wc -l\`` -eq 0 ] && ISNEW=1 129 [ `echo \`ls "${BASE_DIR}/${TARGET_DIR}" | wc -l\`` -eq 0 ] && ISNEW=1
130 # let's move to workdir 130 # let's move to workdir
131 cd "${BASE_DIR}/temp" 131 cd "${BASE_DIR}/temp"
132 for i in error ok list newlist; do 132 for i in error ok list newlist; do
133 touch "${TARGET_DIR}-${i}" || Fatal_Err "Error creating ${TARGET_DIR}-${i}. This shouldn't happen" 133 touch "${SITE_DIR}-${TARGET_DIR}-${i}" || Fatal_Err "Error creating ${TARGET_DIR}-${i}. This shouldn't happen"
134 done 134 done
135 # 135 #
136 } 136 }
137 137
138 # check files correctness 138 # check files correctness
239 -s|--site) 239 -s|--site)
240 shift 240 shift
241 SITE="$1" 241 SITE="$1"
242 ;; 242 ;;
243 *) 243 *)
244 SITE=DEFAULT_SITE 244 SITE="${DEFAULT_SITE}"
245 ;; 245 ;;
246 esac 246 esac
247 shift 247 shift
248 TAGS="$@" 248 TAGS="$@"
249 echo "Tags: ${TAGS}" 249 echo "Tags: ${TAGS}"
250 # slash is not wanted for folder name 250 # slash is not wanted for folder name
251 TARGET_DIR=`echo "${TAGS}" | sed -e 's/\//_/g'` 251 TARGET_DIR=`echo "${TAGS}" | sed -e 's/\//_/g'`
252 SITE_DIR=`echo "${SITE}" | sed -e 's/\//_/g'` 252 SITE_DIR=`echo "${SITE}" | sed -e 's/\/$//g;s/\//_/g'`
253 } 253 }
254 254
255 Msg_Welcome 255 Msg_Welcome
256 Init "$@" 256 Init "$@"
257 Check_Tools 257 Check_Tools