Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > contrib-release > by-pkgid > c6454a7d19cd57977a01a0a487d83b56 > scriptlet

ayttm-0.5.0.10-1mdv2008.1.x86_64.rpm

POSTIN

/bin/sh
if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi 

if [ -x /usr/bin/gtk-update-icon-cache ]; then 
/usr/bin/gtk-update-icon-cache --force --quiet /usr/share/icons/hicolor || true; fi 

# Fix the paths to the modules in the prefs files...
# Note that $ has to be escaped so the shell doesn't wack 
# them.
/usr/bin/perl <<EOP
while (my (@pwent) = getpwent()) {
  my \$homedir = \$pwent[7];
  my \$prefs;
  if (open PREFS, "<\$homedir/.ayttm/prefs") {
    while (<PREFS>) {
      s!/usr/share/ayttm/modules!/usr/lib64/ayttm!g;
      \$prefs .= \$_;
    }
    close PREFS;
    unless (rename("\$homedir/.ayttm/prefs","\$homedir/.ayttm/prefs.orig")) {
      warn "Cannot rename \$homedir/.ayttm/prefs to \$homedir/.ayttm/prefs.orig";
      next;
    }
    open PREFS, ">\$homedir/.ayttm/prefs";
    print PREFS \$prefs;
    close PREFS;
  }
}
EOP

POSTUN

/bin/sh
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi 

if [ -x /usr/bin/gtk-update-icon-cache -a -r /usr/share/icons/hicolor/index.theme ]; then 
/usr/bin/gtk-update-icon-cache --force --quiet /usr/share/icons/hicolor || true ; fi