I forgot the frozen status and have done some minor commits. I'm pretty sure they don't break anything as they are small and tested. In short two (welltested) cleanups, one bugfix and one cleanup, using the code from the bugfix in another file.

However I like to remove more instances of Temporary_File, that are only used as workarounds, and I've attached three patches for this for readthrough before commit.

--
/Jonas

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Index: bin/Compile
===================================================================
RCS file: /sources/goboscripts/tools/Compile/bin/Compile,v
retrieving revision 1.192
diff -u -r1.192 Compile
@@ -899,18 +899,11 @@
       patch -Np1 -i $i || Die "Failed on patch $i"
    done
 
-   find "$recipedir" -name "*.patch.in" | sort | while read i
+   while read patch
    do
-      Log_Verbose "Converting patch $i..."
-      temppatch=`Temporary_File`
-      (
-         export_marked
-         ApplyVariables -i Compile "$i" > $temppatch
-      )
-      Log_Verbose "Applying patch $temppatch..."
-      patch -Np1 -i $temppatch
-      # rm $temppatch
-  done
+      Log_Verbose "Applying patch generated from ${patch}..."
+      patch -Np1 < <(export_marked; ApplyVariables -i Compile "${patch}")
+   done < <(find "$recipedir" -name "*.patch.in" | sort)
 
    popd &> /dev/null
 fi
Index: bin/NewVersion
===================================================================
RCS file: /sources/goboscripts/tools/Compile/bin/NewVersion,v
retrieving revision 1.27
diff -u -r1.27 NewVersion
--- bin/NewVersion	28 Mar 2007 17:12:43 -0000	1.27
+++ bin/NewVersion	13 Apr 2007 10:01:50 -0000
@@ -166,8 +166,7 @@
    file="`basename $url`"
    filesize="`Get_Size $compileArchivesDir/$file`"
    filemd5="`Get_MD5 $compileArchivesDir/$file`"
-   tmpfile=`Temporary_File`
-   cat "$newrecipedir/Recipe" | sed "s,\(^url=.*\),\1\nfile_size=$filesize\nfile_md5=$filemd5,g" > $tmpfile && mv $tmpfile "$newrecipedir/Recipe"
+   sed -i "s,\(^url=.*\),\1\nfile_size=$filesize\nfile_md5=$filemd5,g" "$newrecipedir/Recipe"
 fi
 
 Log_Normal "Recipe template for $packagename $newversion created"
Index: bin/UpdateRecipes
===================================================================
RCS file: /sources/goboscripts/tools/Compile/bin/UpdateRecipes,v
retrieving revision 1.7
diff -u -r1.7 UpdateRecipes
--- bin/UpdateRecipes	16 Feb 2007 13:03:56 -0000	1.7
+++ bin/UpdateRecipes	13 Apr 2007 10:01:31 -0000
@@ -65,10 +65,9 @@
    do
       lsfile="$getRecipeStoreHttp/RecipeList"
       Log_Normal "Updating recipes from store $getRecipeStoreHttp"
-      tmplsfile=`Temporary_File`
-      Quiet wget $lsfile -O $tmplsfile
+      tmpls=$(wget $lsfile -O - 2>/dev/null)
       
-      cat $tmplsfile | while read recipename
+      for ${recipename} in ${tmpls}
       do
          noext="$recipename"
          noext=${noext%--recipe.tar.bz2}
_______________________________________________
gobolinux-devel mailing list
[EMAIL PROTECTED]
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to