tazpkg rev 599

Remove xhtml-list (we have tazpanel now) save 101 lines
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 24 13:39:03 2012 +0200 (2012-05-24)
parents 773b38c19f4e
children 88439461afd9
files tazpkg
line diff
     1.1 --- a/tazpkg	Thu May 24 13:36:35 2012 +0200
     1.2 +++ b/tazpkg	Thu May 24 13:39:03 2012 +0200
     1.3 @@ -72,7 +72,6 @@
     1.4    usage            `gettext \"Print this short usage.\"`
     1.5    bugs             `gettext \"Show known bugs in packages.\"`
     1.6    list|-l          `gettext \"List installed packages on the system by category or all.\"`
     1.7 -  xhtml-list       `gettext \"Create a xHTML list of installed packages.\"`
     1.8    list-mirror      `gettext \"List all available packages on the mirror (--diff for new).\"`
     1.9    info             `gettext \"Print information about a package.\"`
    1.10    desc             `gettext \"Print description of a package (if it exists).\"`
    1.11 @@ -774,73 +773,6 @@
    1.12  	fi
    1.13  }
    1.14  
    1.15 -# xHTML packages list header.
    1.16 -xhtml_header()
    1.17 -{
    1.18 -	cat > $XHTML_LIST << _EOT_
    1.19 -<!DOCTYPE html>
    1.20 -<html xmlns="http://www.w3.org/1999/xhtml">
    1.21 -<head>
    1.22 -	<title>Install packages on: `hostname`</title>
    1.23 -	<meta charset="utf-8" />
    1.24 -	<style type="text/css">
    1.25 -	body { font: 88% sans-serif, vernada, arial; margin: 0; }
    1.26 -	#header { background: #351a0a; height: 40px; border-bottom: 8px solid #d66018; }
    1.27 -	#content { margin: 40px 80px; text-align: justify; }
    1.28 -	#footer { text-align: center; padding: 20px; border-top: 1px solid #ddd; }
    1.29 -	h1 { margin: 0; padding: 8px; color: #fff; font-size: 20px; }
    1.30 -	h2 { color: #444; } h3 { color: #666; font-size: 140%; }
    1.31 -	pre { background-color: #f8f8f8; border: 1px solid #ddd; padding: 10px;
    1.32 -		-moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;}
    1.33 -	</style>
    1.34 -</head>
    1.35 -<body>
    1.36 -
    1.37 -<body>
    1.38 -<div id="header">
    1.39 -	<h1>Installed packages list</h1>
    1.40 -</div>
    1.41 -
    1.42 -<!-- Start content -->
    1.43 -<div id="content">
    1.44 -
    1.45 -<p>
    1.46 -_packages_ packages installed - List generated on : $DATE
    1.47 -<p>
    1.48 -
    1.49 -_EOT_
    1.50 -}
    1.51 -
    1.52 -# xHTML content with packages info.
    1.53 -xhtml_pkg_info()
    1.54 -{
    1.55 -	cat >> $XHTML_LIST << _EOT_
    1.56 -<h3>$PACKAGE</h3>
    1.57 -<pre>
    1.58 -Version    : $VERSION$EXTRAVERSION
    1.59 -Short desc : $SHORT_DESC
    1.60 -Web site   : <a href="$WEB_SITE">$WEB_SITE</a>
    1.61 -</pre>
    1.62 -
    1.63 -_EOT_
    1.64 -}
    1.65 -
    1.66 -# xHTML packages list footer.
    1.67 -xhtml_footer()
    1.68 -{
    1.69 -	cat >> $XHTML_LIST << _EOT_
    1.70 -<hr />
    1.71 -<p id="footer">
    1.72 -$packages packages installed - List generated on : $DATE
    1.73 -</p>
    1.74 -
    1.75 -<!-- End content -->
    1.76 -</div>
    1.77 -</body>
    1.78 -</html>
    1.79 -_EOT_
    1.80 -}
    1.81 -
    1.82  # Search pattern in installed packages.
    1.83  search_in_installed_packages()
    1.84  {
    1.85 @@ -1551,39 +1483,6 @@
    1.86  			eval_gettext "\$packages packages installed."; echo
    1.87  			echo ""
    1.88  		fi ;;
    1.89 -	xhtml-list)
    1.90 -		# Get info in receipts and build list.
    1.91 -		DATE=`date +%Y-%m-%d\ \%H:%M:%S`
    1.92 -		if [ -n "$2" ]; then
    1.93 -			XHTML_LIST=$2
    1.94 -		else
    1.95 -			XHTML_LIST=installed-packages.html
    1.96 -		fi
    1.97 -		echo ""
    1.98 -		echo -e "\033[1m`gettext \"Creating xHTML list of installed packages\"`\033[0m"
    1.99 -		separator
   1.100 -		gettext "Generating xHTML header..."
   1.101 -		xhtml_header
   1.102 -		status
   1.103 -		# Packages
   1.104 -		gettext "Creating packages information..."
   1.105 -		for pkg in $INSTALLED/*
   1.106 -		do
   1.107 -			[ -f $pkg/receipt ] || continue
   1.108 -			EXTRAVERSION=""
   1.109 -			. $pkg/receipt
   1.110 -			xhtml_pkg_info
   1.111 -			packages=$(($packages+1))
   1.112 -		done
   1.113 -		status
   1.114 -		gettext "Generating xHTML footer..."
   1.115 -		xhtml_footer
   1.116 -		status
   1.117 -		# sed pkgs nb in header.
   1.118 -		sed -i s/'_packages_'/"$packages"/ $XHTML_LIST
   1.119 -		separator
   1.120 -		eval_gettext "\$XHTML_LIST created - $packages packages."; echo
   1.121 -		echo "" ;;
   1.122  	list-mirror)
   1.123  		# List all available packages on the mirror. Option --diff displays
   1.124  		# last mirrored packages diff (see recharge).