#!/bin/bash #(c) Copyright Barry Kauler 2009, puppylinux.com. #2009 Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html) #generates index.html master help page. called from petget, rc.update, # /usr/local/petget/installpreview.sh, 3builddistro (in Woof). #w012 commented-out drop-down for all installed pkgs as too big in Ubuntu-Puppy. #w016 support/find_homepages (in Woof) used to manually update HOMEPAGEDB variable. #w019 now have /root/.packages/PKGS_HOMEPAGES #w464 reintroduce dropdown help for all builtin packages. #v423 file PKGS_HOMEPAGES is now a db of all known pkgs, not just in puppy. #120225 copy from raw doc files. export LANG=C source /etc/DISTRO_SPECS #has DISTRO_BINARY_COMPAT, DISTRO_COMPAT_VERSION, DISTRO_PUPPYDATE source /root/.packages/DISTRO_PKGS_SPECS setvar WKGDIR = "$(pwd)" #120225 this is done in Woof by rootfs-skeleton/pinstall.sh, but do need to do it #here to support language translations (see /usr/share/sss/doc_strings)... if test -f /usr/share/doc/index.html.top-raw{ #see Woof rootfs-skeleton/pinstall.sh, also /usr/share/sss/doc_strings cp -f /usr/share/doc/index.html.top-raw /usr/share/doc/index.html.top cp -f /usr/share/doc/index.html.bottom-raw /usr/share/doc/index.html.bottom cp -f /usr/share/doc/home-raw.htm /usr/share/doc/home.htm setvar cutDISTRONAME = "$(echo -n $DISTRO_NAME | cut -f 1 -d ' )" setvar cPATTERN = ""s/cutDISTRONAME/${cutDISTRONAME}/g"" setvar RIGHTVER = "$DISTRO_VERSION" setvar dPATTERN = ""s/PUPPYDATE/${DISTRO_PUPPYDATE}/g"" setvar PATTERN1 = ""s/RIGHTVER/${RIGHTVER}/g"" setvar PATTERN2 = ""s/DISTRO_VERSION/${DISTRO_VERSION}/g"" setvar nPATTERN = ""s/DISTRO_NAME/${DISTRO_NAME}/g"" sed -i -e $PATTERN1 -e $PATTERN2 -e $nPATTERN -e $dPATTERN -e $cPATTERN /usr/share/doc/index.html.top sed -i -e $PATTERN1 -e $PATTERN2 -e $nPATTERN -e $dPATTERN /usr/share/doc/index.html.bottom #...note, /usr/sbin/indexgen.sh puts these together as index.html (normally via rc.update and 3builddistro). sed -i -e $nPATTERN /usr/share/doc/home.htm } #search for installed pkgs with descriptions... #search .desktop files... # -e '\% %d' = ignore .desktop files with spaces, otherwise everything fails.. setvar PKGINFO1 = "$(ls -1 /usr/share/applications | sed -e 's%^%/usr/share/applications/%' -e '\% %d' | xargs cat - | grep '^Name=' | cut -f 2 -d '=)" #...normal format of each entry is 'name description', ex: 'Geany text editor'. setvar EXCLLISTsd = "" 0rootfs_skeleton autologin bootflash burniso2cd cd/dvd check configure desktop format network pupdvdtool wallpaper pbackup pburn pcdripper pdict pdisk pdvdrsab pmetatagger pschedule pstopwatch prename pprocess pmirror pfind pcdripper pmount puppy pupctorrent pupscan pupx pwireless set text "" cp -f /usr/share/doc/index.html.top /tmp/newinfoindex.xml #dropdown menu for apps in menu... echo '

Applications available in the desktop menu:

' >>/tmp/newinfoindex.xml echo '
' #w464 dropdown list of all builtin pkgs... echo '

Complete list of packages (in Puppy or not):

' #now complete the index.html file... cat /usr/share/doc/index.html.bottom } >> /tmp/newinfoindex.xml #################################################################### mv -f /tmp/newinfoindex.xml /usr/share/doc/index.html ###END###