[subversion-commit] SVN tetex-base commit + diffs: r1385 - tetex-base/trunk/debian

Frank Küster frank at costa.debian.org
Thu May 25 16:36:34 UTC 2006


Author: frank
Date: 2006-05-25 16:36:33 +0000 (Thu, 25 May 2006)
New Revision: 1385

Modified:
   tetex-base/trunk/debian/rules.in
   tetex-base/trunk/debian/searchbase35
   tetex-base/trunk/debian/tetex-base.dirs.in
Log:
- don't create superfluous link, which would cause texdoc -s to find every file twice

- improve searchbase35

- don't create empty dir

Modified: tetex-base/trunk/debian/rules.in
===================================================================
--- tetex-base/trunk/debian/rules.in	2006-05-24 17:22:15 UTC (rev 1384)
+++ tetex-base/trunk/debian/rules.in	2006-05-25 16:36:33 UTC (rev 1385)
@@ -1,7 +1,7 @@
 #include "variables"
 <:###############################################################################:>//
 <:# WARNING: The rules file AUTOMATICALLY REGENERATES itself from this very one #:>//
-<:#     Read the GNU Make Manual if you don't understand Makefile Remaking!     #:>//
+<:#     Read the GNU Make Manual if you do not understand Makefile Remaking!    #:>//
 <:###############################################################################:>//
 #!/usr/bin/make -f
 #
@@ -207,7 +207,7 @@
 	ln -s tetex-base debian/$(extra)/usr/share/doc/tetex-extra
 #	rm -rf debian/xfonts-tetex/usr/share/doc/xfonts-tetex
 #	(cd debian/xfonts-tetex/usr/share/doc/; ln -s tetex-extra-fonts xfonts-tetex)
-	ln -s ../texmf debian/$(docpack)/usr/share/doc/$(docpack)/
+#	ln -s ../texmf debian/$(docpack)/usr/share/doc/$(docpack)/
 
 	dh_installchangelogs ChangeLog -p tetex-base -p tetex-doc
 	cp debian/changelog.Debian.experimental debian/$(package)/usr/share/doc/$(package)/

Modified: tetex-base/trunk/debian/searchbase35
===================================================================
--- tetex-base/trunk/debian/searchbase35	2006-05-24 17:22:15 UTC (rev 1384)
+++ tetex-base/trunk/debian/searchbase35	2006-05-25 16:36:33 UTC (rev 1385)
@@ -1,20 +1,23 @@
 #!/bin/bash
 
 package=$1
-otherlocation=$2
-outfile=$3
+outfile=$2
 
+shift 2
+otherlocations="$@"
+
+
 CTANmirror="ftp://cam.ctan.org/tex-archive/"
 
-filelist=../../CTAN.FILES.byname
+filelist=~/src/Packages/CTAN.FILES.byname
 
 if [ ! -f $filelist ]; then
   wget -O $filelist ${CTANmirror}FILES.byname
 fi
 
-files=`grep '^[[:space:]]*texmf' debian/tpm/courier.tpm`
+files=`grep '^[[:space:]]*texmf' $package`
 
-wgetFile="./wgetFile" # insecure, but who cares?
+#wgetFile="./wgetFile" # insecure, but who cares?
 
 exec > $outfile
 
@@ -22,26 +25,49 @@
   file=`basename $longfile`
 #   queryURL="http://www.tex.ac.uk/cgi-bin/ctan-index?$file"
 #   wget -O $wgetFile $queryURL
-  queryResult=`grep $file $filelist | sed -e "s at .*| @@"` 
+  queryResult=`grep /$file$ $filelist | sed -e "s at .*| @@"` 
   resultLines=`echo $queryResult | wc -w`
 
   if [ "$resultLines" -eq 1 ]; then
-    echo "$file: $queryResult" 
+    echo -e "$file:\t$queryResult" 
   elif [ "$resultLines" -eq 0 ]; then
-    if [ -f $otherlocation/${longfile#texmf*/} ]; then
-      echo "$file: found in $otherlocation"
-    else
-      echo "$longfile: No hits"
+    found=false
+    for archive in $otherlocations; do
+      if [ ! -f $archive ]; then echo -e "$archive not found."; exit 1; fi
+      extension=${archive#*.}
+      case $extension in
+	tar.gz)
+	  command="tar -tzf"
+	  ;;
+	zip)
+	  command="unzip -l"
+	  ;;
+      esac
+      queryResult=`$command $archive | grep /${longfile#texmf*/}$ | sed -e 's at .*[[:space:]]@@'`
+      resultLines=`echo $queryResult | wc -w`
+      if [ "$resultLines" -eq 1 ]; then
+	echo -e "$file:\t$queryResult\tin `basename $archive`"
+	found=true
+      elif [ "$resultLines" -gt 1 ]; then
+	echo -e "$file\tmultiple hits:"
+	echo -e "$queryResult"
+	echo
+	found=true
+      fi
+    done
+    if [ "$found" = false ]; then
+      echo -e "$longfile:\tNo hits"
     fi
   else
-    echo "File: $file multiple hits:"
-    echo "$queryResult"
+    echo -e "File:\t$file multiple hits:"
+    echo -e "$queryResult"
+    echo
   fi
 done
 
-grep "found in" $outfile > $outfile.packed
+grep "in " $outfile > $outfile.packed
 grep "No hits" $outfile > $outfile.nohits
-sed -e "s/.*multiple hits.*//" $outfile | grep -v ":" > $outfile.multiple
-grep ":" $outfile | egrep -v "hits|found in" > $outfile.single
+grep -v ":" $outfile | sed -e "s/multiple hits.*\n//" > $outfile.multiple
+grep ":" $outfile | egrep -v "hits|in |multiple" > $outfile.single
 
 

Modified: tetex-base/trunk/debian/tetex-base.dirs.in
===================================================================
--- tetex-base/trunk/debian/tetex-base.dirs.in	2006-05-24 17:22:15 UTC (rev 1384)
+++ tetex-base/trunk/debian/tetex-base.dirs.in	2006-05-25 16:36:33 UTC (rev 1385)
@@ -1,7 +1,6 @@
 #include variables
 usr/share/texmf-tetex
 usr/share/doc/tetex-base
-usr/share/tetex-base/maps
 etc/X11/app-defaults
 etc/texmf/updmap.d
 <:=$LANGUAGE_DIR:>




More information about the Pkg-tetex-commits mailing list