WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Script tce-remove refers to copy2ram.lst  (Read 2577 times)

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Script tce-remove refers to copy2ram.lst
« on: April 10, 2015, 05:00:42 PM »
Hi guys,

I couldn't find any reference to "copy2ram.lst" in the Tiny Core book so I guess the name has changed to "copy2fs.lst". Is that right?

In any case, tce-remove should remove extensions from copy2fs.lst

Code: [Select]
#!/bin/sh
# (c) Robert Shingledecker 2011
#
# Alllow removal of uninstalled (ondemand) extensions via tce-audit/appsaudit.
. /etc/init.d/tc-functions
ONBOOTNAME="$(getbootparam lst 2>/dev/null)"
[ -n "$ONBOOTNAME" ] || ONBOOTNAME="onboot.lst"

if [ -s /tmp/audit_marked.lst ]; then
   > /tmp/audit_marked2.lst
   for F in `cat /tmp/audit_marked.lst`; do
      FROMDIR=`dirname "$F"` && TCEDIR=${FROMDIR%/*}
      EXTN=`basename "$F"`; APP=${EXTN%.tcz}
      if installed "$APP"; then
        echo "$F" >> /tmp/audit_marked2.lst
      else
        echo "$F"
        rm -f "$F"*
        LIST="$TCEDIR"/copy2ram.lst; ONBOOT="${TCEDIR}/${ONBOOTNAME}"; XWBAR="$TCEDIR"/xwbar.lst
        if grep -w "$EXTN" "$LIST" >/dev/null 2>&1; then sed -i '/'"$EXTN"'/d' "$LIST"; fi
        if grep -w "$EXTN" "$ONBOOT" >/dev/null 2>&1; then sed -i '/'"$EXTN"'/d' "$ONBOOT"; fi
        if grep -w "$EXTN" "$XWBAR" >/dev/null 2>&1; then sed -i '/'"$EXTN"'/d' "$XWBAR"; fi
        [ -s "$FROMDIR"/tce.db ] && rm -f "$FROMDIR"/tce.db
        [ -s "$FROMDIR"/tce.lst ] && rm -f "$FROMDIR"/tce.lst
        ondemand -r "$APP"
        [ "$ICONS" == "wbar" ] && wbar_rm_icon "$APP" &&  wbar.sh
      fi
   done
   mv /tmp/audit_marked2.lst /tmp/audit_marked.lst
fi

regards
Greg

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Script tce-remove refers to copy2ram.lst
« Reply #1 on: April 11, 2015, 05:05:20 AM »
Yep, thanks for reporting. Fixed.
The only barriers that can stop you are the ones you create yourself.