123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493 |
- #!/bin/sh
- [ "$(cat /var/local/petget/nt_category 2>/dev/null)" != "true" ] && \
- [ -f /tmp/install_quietly ] && set -x
-
- export TEXTDOMAIN=petget___installpreview.sh
- export OUTPUT_CHARSET=UTF-8
- [ "$TREE1" = "" ] && exit
- . /etc/DISTRO_SPECS
- . /root/.packages/DISTRO_PKGS_SPECS
- if [ ! -f /tmp/install_quietly ]; then
- . /usr/lib/gtkdialog/box_splash -close never -text "$(gettext 'Please wait, processing package database files...')" &
- X1PID=$!
- fi
- DB_FILE=Packages-`cat /tmp/petget/current-repo-triad`
- tPATTERN='^'"$TREE1"'|'
- EXAMDEPSFLAG='yes'
- ttPTN='^'"$TREE1"'|.*ALREADY INSTALLED'
- if [ "`grep "$ttPTN" /tmp/petget/filterpkgs.results.post`" != "" ];then
- EXAMDEPSFLAG='no'
- fi
- [ -f /tmp/petget/current-repo-triad.previous ] && rm -f /tmp/petget/current-repo-triad.previous
- if [ -f /tmp/petget/filterpkgs.results.post ];then
- ALTSEARCHREPO="$(grep "$tPATTERN" /tmp/petget/filterpkgs.results.post | grep '|\[' | cut -f 2 -d '[' | cut -f 1 -d ']')"
- [ "$ALTSEARCHREPO" ] && DB_FILE="Packages-${ALTSEARCHREPO}"
-
- if [ "$ALTSEARCHREPO" ];then
- mv -f /tmp/petget/current-repo-triad /tmp/petget/current-repo-triad.previous
- echo -n "$ALTSEARCHREPO" > /tmp/petget/current-repo-triad
- fi
- fi
- rm -f /tmp/petget_missing_dbentries-* 2>/dev/null
- DB_ENTRY="`grep "$tPATTERN" /root/.packages/$DB_FILE | head -n 1`"
- DB_pkgname="`echo -n "$DB_ENTRY" | cut -f 1 -d '|'`"
- DB_nameonly="`echo -n "$DB_ENTRY" | cut -f 2 -d '|'`"
- DB_version="`echo -n "$DB_ENTRY" | cut -f 3 -d '|'`"
- DB_pkgrelease="`echo -n "$DB_ENTRY" | cut -f 4 -d '|'`"
- DB_category="`echo -n "$DB_ENTRY" | cut -f 5 -d '|'`"
- DB_size="`echo -n "$DB_ENTRY" | cut -f 6 -d '|'`"
- DB_path="`echo -n "$DB_ENTRY" | cut -f 7 -d '|'`"
- DB_fullfilename="`echo -n "$DB_ENTRY" | cut -f 8 -d '|'`"
- DB_dependencies="`echo -n "$DB_ENTRY" | cut -f 9 -d '|'`"
- DB_description="`echo -n "$DB_ENTRY" | cut -f 10 -d '|'`"
- [ "$DB_description" = "" ] && DB_description="$(gettext 'no description available')"
- SIZEFREEM=`cat /tmp/pup_event_sizefreem | head -n 1`
- SIZEFREEK=`expr $SIZEFREEM \* 1024`
- if [ $DB_size ];then
- SIZEMK="`echo -n "$DB_size" | rev | cut -c 1`"
- SIZEVAL=`echo -n "$DB_size" | rev | cut -c 2-9 | rev`
- SIZEINFO="<text><label>$(gettext 'After installation, this package will occupy') ${SIZEVAL}${SIZEMK}B. $(gettext 'The amount of free space that you have for installation is') ${SIZEFREEM}MB (${SIZEFREEK}KB).</label></text>"
- SIZEVALz=`expr $SIZEVAL \/ 3`
- SIZEVALz=`expr $SIZEVAL + $SIZEVALz`
- SIZEVALx2=`expr $SIZEVALz + 10000`
- if [ $SIZEVALx2 -ge $SIZEFREEK ];then
- MSGWARN1="${SIZEINFO}<text use-markup=\"true\"><label>\"<b>$(gettext "A general rule-of-thumb is that the free space should be at least the original-package-size plus installed-package-size plus 10MB to allow for sufficient working space during and after installation. It does not look to good, so you had better click the 'Cancel' button")</b> -- $(gettext "note, if you are running Puppy in a mode that has a 'pupsave' file, then the Utility menu has an entry 'Resize personal storage file' that should solve the problem.")\"</label></text>"
- else
- MSGWARN1="${SIZEINFO}<text use-markup=\"true\"><label>\"<b>$(gettext "...free space looks ok, so click 'Install' button:")</b>\"</label></text>"
- fi
- else
- MSGWARN1="<text use-markup=\"true\"><label>\"<b>$(gettext 'Unfortunately the provider of the package database has not supplied the size of this package when installed. If you are able to see the size of the compressed package, multiple that by 3 to get the approximate installed size. The free available space, which is') ${SIZEFREEM}MB (${SIZEFREEK}KB), $(gettext 'should be at least 4 times greater.')</b>\"</label></text>"
- fi
- if [ "$DB_dependencies" = "" ];then
- DEPINFO="<text><label>$(gettext 'It seems that all dependencies are already installed. Sometimes though, the dependency information in the database is incomplete, however a check for presence of needed shared libraries will be done after installation.')</label></text>"
- else
-
- /usr/local/petget/findmissingpkgs.sh "$DB_dependencies"
-
- MISSINGDEPS_PATTERNS="`cat /tmp/petget_missingpkgs_patterns`"
-
-
-
-
-
- DEPBUTTON=""
- ONLYMSG=""
- if [ "$MISSINGDEPS_PATTERNS" = "" ];then
- DEPINFO="<text><label>$(gettext 'It seems that all dependencies are already installed. Sometimes though, the dependency information in the database is incomplete, however a check for presence of needed shared libraries will be done after installation.')</label></text>"
- else
- ONLYMSG=" $(gettext 'ONLY')"
- xMISSINGDEPS="`echo "$MISSINGDEPS_PATTERNS" | sed -e 's%|%%g' | tr '\n' ' '`"
- if [ "$EXAMDEPSFLAG" != "no" ];then
- DEPBUTTON="<button>
- <label>$(gettext 'Examine dependencies')</label>
- <action>echo \"${TREE1}\" > /tmp/petget_installpreview_pkgname</action>
- <action type=\"exit\">BUTTON_EXAMINE_DEPS</action>
- </button>"
- DEPINFO="<text><label>$(gettext 'Warning, the following dependent packages are missing:')</label></text>
- <text use-markup=\"true\"><label>\"<b>${xMISSINGDEPS}</b>\"</label></text>
- <text><label>$(gettext "A warning, these dependencies may have other dependencies not necessarily listed here. It is recommended that you click the 'Examine dependencies' button to find all dependencies before installing.")</label></text>
- <text use-markup=\"true\"><label>\"<b>$(gettext "Please click 'Examine dependencies' to install") ${TREE1} $(gettext "as well as its dependencies")</b>\"</label></text>"
- else
- DEPINFO="<text><label>$(gettext 'Warning, the following dependent packages are missing:')</label></text>
- <text use-markup=\"true\"><label>\"<b>${xMISSINGDEPS}</b>\"</label></text>"
- fi
- if [ $DB_size ];then
- MSGWARN1="<text><label>$(gettext 'After installation, this package will occupy') ${SIZEVAL}${SIZEMK}B, $(gettext 'however the dependencies will need more space so you really need to find what they will need first.')</label></text>"
- else
- MSGWARN1="<text><label>$(gettext 'Also, the package database provider has not supplied the installed size of this package, so you will have to try and estimate whether you have enough free space for it (and the dependencies)')</label></text>"
- fi
- fi
- fi
- [ ! -f /tmp/install_quietly ] && kill $X1PID || echo
- if [ ! -f /tmp/install_quietly ]; then
- export PREVIEW_DIALOG="<window title=\"$(gettext 'Puppy Package Manager: preinstall')\" icon-name=\"gtk-about\">
- <vbox>
- <text><label>$(gettext 'You have chosen to install package') '${TREE1}'. $(gettext 'A short description of this package is:')</label></text>
- <text use-markup=\"true\"><label>\"<b>${DB_description}</b>\"</label></text>
- ${DEPINFO}
-
- ${MSGWARN1}
-
- <frame>
- <hbox>
- <text><label>$(gettext 'If you would like more information about') '${TREE1}', $(gettext 'such as what it is for and the dependencies, this button will download and display detailed information:')</label></text>
- <button><label>$(gettext 'More info')</label><action>/usr/local/petget/fetchinfo.sh ${TREE1} & </action></button>
- </hbox>
- </frame>
-
- <hbox>
- ${DEPBUTTON}
- <button>
- <label>$(gettext 'Install') ${TREE1}${ONLYMSG}</label>
- <action>echo \"${TREE1}\" > /tmp/petget_installpreview_pkgname</action>
- <action type=\"exit\">BUTTON_INSTALL</action>
- </button>
- <button>
- <label>$(gettext 'Download-only')</label>
- <action type=\"exit\">BUTTON_PKGS_DOWNLOADONLY</action>
- </button>
- <button cancel></button>
- </hbox>
- </vbox>
- </window>
- "
- RETPARAMS="`gtkdialog3 --center --program=PREVIEW_DIALOG`"
- else
- if [ -f /tmp/download_only_pet_quietly ]; then
- RETPARAMS='EXIT="BUTTON_PKGS_DOWNLOADONLY"'
- elif [ "$MISSINGDEPS_PATTERNS" != "" ];then
- RETPARAMS='EXIT="BUTTON_EXAMINE_DEPS"'
- elif [ -f /tmp/download_pets_quietly ]; then
- RETPARAMS='EXIT="BUTTON_PKGS_DOWNLOADONLY"'
- else
- RETPARAMS='EXIT="BUTTON_INSTALL"'
- fi
- fi
- eval "$RETPARAMS"
- if [ "$EXIT" != "BUTTON_INSTALL" -a "$EXIT" != "BUTTON_EXAMINE_DEPS" -a "$EXIT" != "BUTTON_PKGS_DOWNLOADONLY" ];then
- [ -f /tmp/petget/current-repo-triad.previous ] && mv -f /tmp/petget/current-repo-triad.previous /tmp/petget/current-repo-triad
- exit
- fi
- if [ "$EXIT" = "BUTTON_EXAMINE_DEPS" ];then
- /usr/local/petget/dependencies.sh
- [ $? -ne 0 ] && exec /usr/local/petget/installpreview.sh
-
-
-
-
- FNDMISSINGDBENTRYFILE="`ls -1 /tmp/petget_missing_dbentries-* 2>/dev/null`"
- if [ "$FNDMISSINGDBENTRYFILE" = "" -a ! -f /tmp/install_quietly ];then
- . pupdialog --title "$(gettext 'PPM: examine dependencies')" --background LightYellow --msgbox "$(gettext 'There seem to be no missing dependencies.')
- $(gettext 'Note: if the previous window indicated that there are missing dependencies, they were not found. Sometimes, a package database lists a dependency that does not actually exist anymore and is not required.')" 0 0
- exec /usr/local/petget/installpreview.sh
- fi
-
-
- if ! which gcc; then
- NEEDGCC="$(cat /tmp/petget_missing_dbentries-* | grep -E '\|gcc\||\|gcc_dev_DEV\|' | cut -f 1 -d '|')"
- if [ "$NEEDGCC" ];then
- rm -f /tmp/petget_installed_patterns_system
-
- DEVXNAME="devx_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
- echo "#!/bin/sh
- sleep 3
- . pupdialog --background pink --colors --ok-label \"$(gettext 'OK')\" --backtitle \"$(gettext 'WARNING: devx not installed')\" --msgbox \"$(gettext 'Package:') \Zb${TREE1}\ZB
- $(gettext "This package has dependencies that are in the 'devx' SFS file, which is Puppy's C/C++/Vala/Genie/BaCon mega-package, a complete compiling environment.")
- $(gettext 'The devx file is named:') \Zb${DEVXNAME}\ZB
- $(gettext "Please cancel installation, close the Puppy Package Manager, then click the \Zbinstall\ZB icon on the desktop and install the devx SFS file first.")\" 0 0" > /tmp/petget_devx_popup.sh
- chmod 755 /tmp/petget_devx_popup.sh
- /tmp/petget_devx_popup.sh &
- fi
- fi
-
-
- MAIN_REPO="`echo "$DB_FILE" | cut -f 2-9 -d '-'`"
- MAINPKG_NAME="`echo "$DB_ENTRY" | cut -f 1 -d '|'`"
- MAINPKG_SIZE="`echo "$DB_ENTRY" | cut -f 6 -d '|'`"
- MAINPKG_DESCR="`echo "$DB_ENTRY" | cut -f 10 -d '|'`"
- MAIN_CHK="<checkbox><default>true</default><label>${MAINPKG_NAME} SIZE: ${MAINPKG_SIZE}B DESCRIPTION: ${MAINPKG_DESCR}</label><variable>CHECK_PKG_${MAIN_REPO}_${MAINPKG_NAME}</variable></checkbox>"
- INSTALLEDSIZEK=0
- [ "$MAINPKG_SIZE" != "" ] && INSTALLEDSIZEK=`echo "$MAINPKG_SIZE" | rev | cut -c 2-10 | rev`
-
-
-
- echo -n "" > /tmp/petget_moreframes
- echo -n "" > /tmp/petget_tabs
- echo "0" > /tmp/petget_frame_cnt
- DEP_CNT=0
- ONEREPO=""
- for ONEDEPSLIST in `ls -1 /tmp/petget_missing_dbentries-*`
- do
- ONEREPO_PREV="$ONEREPO"
- ONEREPO="`echo "$ONEDEPSLIST" | grep -o 'Packages.*' | sed -e 's%Packages\\-%%'`"
- FRAME_CNT=`cat /tmp/petget_frame_cnt`
- if [ "$ONEREPO_PREV" != "" ];then
- DEP_CNT=0
- FRAME_CNT=`expr $FRAME_CNT + 1`
- echo "$FRAME_CNT" > /tmp/petget_frame_cnt
-
- [ "`cat /tmp/petget_moreframes | tail -n 1 | grep '</frame>$'`" = "" ] && echo "</frame>" >> /tmp/petget_moreframes
- fi
- cat $ONEDEPSLIST |
- while read ONELIST
- do
- DEP_NAME="`echo "$ONELIST" | cut -f 1 -d '|'`"
- DEP_SIZE="`echo "$ONELIST" | cut -f 6 -d '|'`"
- DEP_DESCR="`echo "$ONELIST" | cut -f 10 -d '|'`"
- DEP_CNT=`expr $DEP_CNT + 1`
- case $DEP_CNT in
- 1)
- echo -n "<frame REPOSITORY: ${ONEREPO}>" >> /tmp/petget_moreframes
- echo -n "Dependencies|" >> /tmp/petget_tabs
- echo -n "<checkbox><default>true</default><label>${DEP_NAME} SIZE: ${DEP_SIZE}B DESCRIPTION: ${DEP_DESCR}</label><variable>CHECK_PKG_${ONEREPO}_${DEP_NAME}</variable></checkbox>" >> /tmp/petget_moreframes
- ;;
- 8)
- FRAME_CNT=`cat /tmp/petget_frame_cnt`
- FRAME_CNT=`expr $FRAME_CNT + 1`
- if [ $FRAME_CNT -gt 10 ];then
- echo -n "<text use-markup=\"true\"><label>\"<b>$(gettext 'SORRY! Too many dependencies, list truncated. Suggest click Cancel button and install some deps first.')</b>\"</label></text>" >> /tmp/petget_moreframes
- else
- echo -n "<checkbox><default>true</default><label>${DEP_NAME} SIZE: ${DEP_SIZE}B DESCRIPTION: ${DEP_DESCR}</label><variable>CHECK_PKG_${ONEREPO}_${DEP_NAME}</variable></checkbox>" >> /tmp/petget_moreframes
- fi
- echo "</frame>" >> /tmp/petget_moreframes
- DEP_CNT=0
- echo "$FRAME_CNT" > /tmp/petget_frame_cnt
- ;;
- *)
- echo -n "<checkbox><default>true</default><label>${DEP_NAME} SIZE: ${DEP_SIZE}B DESCRIPTION: ${DEP_DESCR}</label><variable>CHECK_PKG_${ONEREPO}_${DEP_NAME}</variable></checkbox>" >> /tmp/petget_moreframes
- ;;
- esac
- [ $FRAME_CNT -gt 10 ] && break
- ADDSIZEK=0
- [ "$DEP_SIZE" != "" ] && ADDSIZEK=`echo "$DEP_SIZE" | rev | cut -c 2-10 | rev`
- INSTALLEDSIZEK=`expr $INSTALLEDSIZEK + $ADDSIZEK`
- echo "$INSTALLEDSIZEK" > /tmp/petget_installedsizek
- done
- INSTALLEDSIZEK=`cat /tmp/petget_installedsizek`
- FRAME_CNT=`cat /tmp/petget_frame_cnt`
- [ $FRAME_CNT -gt 10 ] && break
- done
- TABS="`cat /tmp/petget_tabs`"
- MOREFRAMES="`cat /tmp/petget_moreframes`"
-
- [ "`echo "$MOREFRAMES" | tail -n 1 | grep '</frame>$'`" = "" ] && MOREFRAMES="${MOREFRAMES}</frame>"
-
- INSTALLEDSIZEM=`expr $INSTALLEDSIZEK \/ 1024`
- MSGWARN2="$(gettext "If that looks like enough free space, go ahead and click the 'Install' button...")"
- testSIZEK=`expr $INSTALLEDSIZEK \/ 3`
- testSIZEK=`expr $INSTALLEDSIZEK + $testSIZEK`
- testSIZEK=`expr $testSIZEK + 8000`
- [ $testSIZEK -gt $SIZEFREEK ] && MSGWARN2="$(gettext "Not too good! recommend that you make more space before installing -- see 'Resize personal storage file' in the 'Utility' menu.")"
- if [ ! -f /tmp/install_quietly ]; then
- export DEPS_DIALOG="<window title=\"$(gettext 'Puppy Package Manager: dependencies')\" icon-name=\"gtk-about\">
- <vbox>
-
- <frame REPOSITORY: ${MAIN_REPO}>
- ${MAIN_CHK}
- </frame>
- <notebook labels=\"${TABS}\">
- ${MOREFRAMES}
- </notebook>
-
- <hbox>
- <text><label>$(gettext "Sometimes Puppy's automatic dependency checking comes up with a list that may include packages that don't really need to be installed, or are already installed under a different name. If uncertain, just accept them all, but if you spot one that does not need to be installed, then un-tick it.")</label></text>
-
- <text><label>$(gettext 'Puppy usually avoids listing the same package more than once if it exists in two or more repositories. However, if the same package is listed twice, choose the one that seems to be most appropriate.')</label></text>
- </hbox>
-
- <hbox>
- <vbox>
- <text><label>$(gettext 'Click to see the hierarchy of the dependencies:')</label></text>
- <hbox>
- <button>
- <label>$(gettext 'View hierarchy')</label>
- <action>/usr/local/bin/defaulttextviewer /tmp/petget_deps_visualtreelog & </action>
- </button>
- </hbox>
- </vbox>
- <text><label>\" \"</label></text>
- <text use-markup=\"true\"><label>\"<b>$(gettext 'If all of the above packages are selected, the total installed size will be') ${INSTALLEDSIZEK}KB (${INSTALLEDSIZEM}MB). $(gettext 'The free space available for installation is') ${SIZEFREEK}KB (${SIZEFREEM}MB). ${MSGWARN2}</b>\"</label></text>
- </hbox>
-
- <hbox>
- <button>
- <label>$(gettext 'Download-only selected packages')</label>
- <action type=\"exit\">BUTTON_PKGS_DOWNLOADONLY</action>
- </button>
- <button>
- <label>$(gettext 'Download-and-install selected packages')</label>
- <action type=\"exit\">BUTTON_PKGS_INSTALL</action>
- </button>
- <button cancel></button>
- </hbox>
- </vbox>
- </window>
- "
- RETPARAMS="`gtkdialog3 --center --program=DEPS_DIALOG`"
- else
- if [ ! -f /tmp/download_pets_quietly ]; then
- xEXIT="BUTTON_PKGS_INSTALL"
- else
- xEXIT="BUTTON_PKGS_DOWNLOADONLY"
- fi
- DEPS_TOINSTALL=$(sed 's/<variable>/\n/g' /tmp/petget_moreframes \
- |grep ^CHECK_PKG_ | cut -f1 -d '<' | sed 's/$/=\"true\"/')
- PKG_TOINSTALL=CHECK_PKG_${MAIN_REPO}_${MAINPKG_NAME}="true"
- RETPARAMS="$DEPS_TOINSTALL
- $PKG_TOINSTALL
- EXIT=$xEXIT"
- [ "$DEPS_TOINSTALL" != "" ] && echo "$DEPS_TOINSTALL" | cut -f 1 -d '=' \
- | cut -f 4-10 -d '_' >> /tmp/pkgs_to_install_done
- rm -f /tmp/petget_moreframes
- fi
-
-
-
-
-
-
-
-
-
- if [ "`echo "$RETPARAMS" | grep '^EXIT' | grep -E 'BUTTON_PKGS_INSTALL|BUTTON_PKGS_DOWNLOADONLY'`" != "" ];then
-
- for ONECHK in `echo "$RETPARAMS" | grep '^CHECK_PKG_' | grep '"false"' | tr '\n' ' '`
- do
- ONEREPO="`echo -n "$ONECHK" | cut -f 1 -d '=' | cut -f 3 -d '_'`"
- ONEPKG="`echo -n "$ONECHK" | cut -f 1 -d '=' | cut -f 4-9 -d '_'`"
- opPATTERN='^'"$ONEPKG"'|'
- grep -v "$opPATTERN" /tmp/petget_missing_dbentries-Packages-${ONEREPO} > /tmp/petget_tmp
- mv -f /tmp/petget_tmp /tmp/petget_missing_dbentries-Packages-${ONEREPO}
- done
- else
- [ -f /tmp/petget/current-repo-triad.previous ] && mv -f /tmp/petget/current-repo-triad.previous /tmp/petget/current-repo-triad
- exit
- fi
- fi
- touch /tmp/petget_missing_dbentries-${DB_FILE}
- mPATTERN='^'"$TREE1"'|'
- if [ "`grep "$mPATTERN" /tmp/petget_missing_dbentries-${DB_FILE}`" = "" ];then
- echo "$DB_ENTRY" >> /tmp/petget_missing_dbentries-${DB_FILE}
- fi
- PASSEDPRM=""
- [ "`echo "$RETPARAMS" | grep '^EXIT' | grep 'BUTTON_PKGS_DOWNLOADONLY'`" != "" ] && PASSEDPRM="DOWNLOADONLY" && touch /tmp/manual_pkg_download
- /usr/local/petget/downloadpkgs.sh $PASSEDPRM
- if [ $? -ne 0 ];then
- [ -f /tmp/petget/current-repo-triad.previous ] && mv -f /tmp/petget/current-repo-triad.previous /tmp/petget/current-repo-triad
- exit 1
- fi
- [ "$PASSEDPRM" = "DOWNLOADONLY" ] && exit
- if [ -f /tmp/install_pets_quietly ]; then
- LEFT=$(cat /tmp/pkgs_left_to_install | wc -l)
- [ "$LEFT" -le 1 ] && UPDATE_MENUS=yes
- else
- UPDATE_MENUS=yes
- fi
- if [ "$UPDATE_MENUS" = "yes" ]; then
- INSTALLEDCAT="menu"
- [ "`cat /tmp/petget-installed-pkgs-log | grep -o 'CATEGORY' | grep -v 'none'`" = "" ] && INSTALLEDCAT="none"
- RESTARTMSG="$(gettext 'Please wait, updating help page and menu...')"
- if [ "`pidof jwm`" != "" ];then
- JWMVER=`jwm -v|head -n1|cut -d ' ' -f2|cut -d - -f2`
- if vercmp $JWMVER lt 574;then
- RESTARTMSG="$(gettext 'Please wait, updating help page and menu (the screen will flicker!)...')"
- fi
- fi
- [ "$INSTALLEDCAT" = "none" ] && RESTARTMSG="$(gettext 'Please wait, updating help page...')"
- if [ ! -f /tmp/install_quietly ]; then
- /usr/lib/gtkdialog/box_splash -text "${RESTARTMSG}" &
- X3PID=$!
- fi
- fi
- iUPDATE='no'
- for iONE in `cat /tmp/petget_missing_dbentries-* | cut -f 1 -d '|' | tr '\n' ' '`
- do
- if [ -f /root/.packages/${iONE}.files ]; then
- [ "`grep 'usr/share/icons/hicolor' /root/.packages/${iONE}.files`" != "" ] \
- && echo yes >> /tmp/iUPDATE
- fi
- done
- if [ "$UPDATE_MENUS" = "yes" ]; then
- if [ "$(grep yes /tmp/iUPDATE)" != "" ]; then \
- gtk-update-icon-cache -f /usr/share/icons/hicolor/
- rm -f /tmp/iUPDATE
- fi
- fi
- if [ "$UPDATE_MENUS" = "yes" -a "$INSTALLEDCAT" != "none" ];then
- nohup /usr/sbin/fixmenus
- if [ "`pidof jwm`" != "" ];then
- if vercmp $JWMVER lt 574;then
- jwm -restart
- else
- jwm -reload
- fi
- fi
- fi
- [ ! -f /tmp/install_quietly ] && kill $X3PID || echo
- PKGS="`cat /tmp/petget_missing_dbentries-* | cut -f 1 -d '|' | tr '\n' '|'`"
- /usr/local/petget/check_deps.sh $PKGS
- [ -f /tmp/petget/current-repo-triad.previous ] && mv -f /tmp/petget/current-repo-triad.previous /tmp/petget/current-repo-triad
- rm -f nohup.out 2>/dev/null
|