s243a

intallpkg.sh (tahrpup) LN# 476-508 post install scripts

Apr 22nd, 2018
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.14 KB | None | 0 0
  1. #post-install script?... # LN# 476-508 of /usr/local/petget/installpkg.sh (tahrpup) -
  2. #          puppy         slackware       debian/ubuntu/etc
  3. for i in /pinstall.sh /install/doinst.sh /DEBIAN/postinst
  4. do
  5.     [ ! -e "$i" ] && continue
  6.     chmod +x ${i}
  7.     cd /
  8.     LANG=$LANG_USER nohup sh ${i} &
  9.     sleep 0.2
  10.     rm -f ${i}
  11. done
  12.  
  13. #130314 run arch linux pkg post-install script...
  14. if [ -f /.INSTALL ];then #arch post-install script.
  15.  if [ -f /usr/local/petget/ArchRunDotInstalls ];then #precaution. see 3builddistro, script created by noryb009.
  16.   #this code is taken from below...
  17.   dlPATTERN='|'"`echo -n "$DLPKG_BASE" | sed -e 's%\\-%\\\\-%'`"'|'
  18.   archVER="`cat /tmp/petget_missing_dbentries-Packages-* | grep "$dlPATTERN" | head -n 1 | cut -f 3 -d '|'`"
  19.   if [ "$archVER" ];then #precaution.
  20.    cd /
  21.    mv -f .INSTALL .INSTALL1-${archVER}
  22.    cp -a /usr/local/petget/ArchRunDotInstalls /ArchRunDotInstalls
  23.    LANG=$LANG_USER /ArchRunDotInstalls
  24.    rm -f ArchRunDotInstalls
  25.    rm -f .INSTALL*
  26.   fi
  27.  fi
  28. fi
  29.  
  30. #v424 .pet pkgs may have a post-uninstall script...
  31. if [ -f /puninstall.sh ];then
  32.  mv -f /puninstall.sh /root/.packages/${DLPKG_NAME}.remove
  33. fi
Advertisement
Add Comment
Please, Sign In to add comment