Advertisement
s243a

petget LN#180-194 - find entry in databases

Apr 20th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.90 KB | None | 0 0
  1. #find entry in databases... # LN#180-194 /usr/sbin/petget (tahrpup) - https://www.pearltrees.com/s243a/source-petget-usr-sbin/id20395775/item224036918
  2. #pkgname|nameonly|version|pkgrelease|category|size|path|fullfilename|dependencies|description|
  3. #optionally on the end: compileddistro|compiledrelease|repo| (fields 11,12,13)
  4. pPATTERN='^'"$PKGNAME"'|'
  5. if [ "$EXT" = ".pet" ];then
  6.  DB_ENTRY="`cat /root/.packages/Packages-puppy-* | grep "$pPATTERN" | sort -r | head -n 1`"
  7. else
  8.  DB_ENTRY="`cat /root/.packages/Packages-${DISTRO_BINARY_COMPAT}-* | grep "$pPATTERN" | head -n 1`"
  9. fi
  10.  
  11. #w482 doesn't matter if incomplete, installpkg.sh will read .desktop file for description and category...
  12. #also, if .pet pkg has pet.specs, that will get written to /root/.packages/user-packages-installed
  13. if [ "$DB_ENTRY" = "" ];then
  14.  DB_ENTRY="${PKGNAME}|${DB_nameonly}|${DB_version}|${DB_pkgrelease}||||${FULLPKGNAME}|||"
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement