# HG changeset patch # User edhoprima # Date 1240675049 0 # Node ID 67df02877319b2c323f3c856d659307d3154db63 # Parent 3d6b2152f4a3f5c4f60e8c78037e1f503699a5f9 added quickfetch for skipping file checking diff -r 3d6b2152f4a3 -r 67df02877319 moefetch.sh --- a/moefetch.sh Sat Apr 25 15:47:27 2009 +0000 +++ b/moefetch.sh Sat Apr 25 15:57:29 2009 +0000 @@ -96,7 +96,11 @@ echo "`echo \`ls | wc -l\`` file(s) available locally" cd .. else - echo "Empty local repository" + if [ $ISQUICK -eq 1 ]; then + echo "quick mode selected. Skipping check" + else + echo "Empty local repository" + fi cat "$outdir-list" > "$outdir-newlist" fi } @@ -109,7 +113,7 @@ else echo "Starting wget" cd "../$outdir" - wget -bi "../temp/$outdir-newlist" -o "../temp/$outdir.log" + wget -bi -e continue=on "../temp/$outdir-newlist" -o "../temp/$outdir.log" fi } @@ -146,17 +150,19 @@ # initialization # are we really doing it? +HELP="Usage: moefetch (quick)fetch|status " + if [ $# -lt 2 ]; then - echo "Usage: moefetch status|fetch|update " + echo "$HELP" exit 1 fi case "$1" in - status|get|update) + status|fetch|quickfetch) echo "Starting..." ;; *) - echo "Usage: moefetch status|fetch|update " + echo "$HELP" exit 1 ;; esac @@ -169,6 +175,7 @@ echo "Tags: $tags" # slash do not want outdir=`echo "$tags" | sed -e 's/\//_/g'` +ISNEW=0 if [ -O "$basedir" ]; then if [ ! -d "$basedir/$outdir" ]; then ISNEW=1 @@ -201,17 +208,21 @@ # # let's do the job! +ISQUICK=0 case "$1" in status) GENERATE CHECK ;; - get) + fetch) GENERATE CHECK FETCH ;; - update) + quickfetch) + GENERATE + ISNEW=1 + ISQUICK=1 + CHECK FETCH - ;; esac