s243a

installpkg.sh Ln# 703-713 trim file list

Apr 24th, 2018
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.55 KB | None | 0 0
  1. # Ln# 703-713 of /usr/local/petget/installpkg.sh (tahrpup) - http://www.pearltrees.com/s243a/installpkg-sh-usr-local-petget/id20402080/item224201776
  2. #due to images at / in .pet and post-install script, .files may have some invalid entries...
  3. INSTFILES="`cat /root/.packages/${DLPKG_NAME}.files`"
  4. echo "$INSTFILES" |
  5. while read ONEFILE
  6. do
  7.  if [ ! -e "$ONEFILE" ];then
  8.   ofPATTERN='^'"$ONEFILE"'$'
  9.   grep -v "$ofPATTERN" /root/.packages/${DLPKG_NAME}.files > /tmp/petget_instfiles
  10.   mv -f /tmp/petget_instfiles /root/.packages/${DLPKG_NAME}.files
  11.  fi
  12. done
Advertisement
Add Comment
Please, Sign In to add comment