which_ati_pkg 832 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. #101112 fixed path include supported_chips
  3. #110827 ati db entry may have dep |+linux_kernel&eq2.6.32|, so insert 'q'.
  4. DEVICEID="$1"
  5. PET_DB_FILE="$2" #exs: Packages-puppy-wary5-official, Packages-puppy-lucid-official, Packages-puppy-5-official
  6. dPATTERN='|'"$DEVICEID"'$'
  7. . /usr/local/video_upgrade/supported_chips #101112
  8. echo -n "" > /tmp/vuw_ati_pkg
  9. KERNELVER="`uname -r`"
  10. #110827 ati db entry may have dep |+linux_kernel&eq2.6.32|, so insert 'q'...
  11. kPATTERN='[kq]'"`echo -n "$KERNELVER" | sed -e 's%\.%\\\.%g'`"
  12. PETS_ATI="`grep '^ati_fglrx\-' /root/.packages/${PET_DB_FILE} | grep -i "${kPATTERN}" | cut -f 8 -d '|'`"
  13. if [ "`echo "$ATICHIPS_10_10" | grep -i "$dPATTERN"`" != "" ];then
  14. PET="`echo "$PETS_ATI" | grep '^ati_fglrx\-10\.10\-' | tail -n 1`"
  15. echo -n "$PET" > /tmp/vuw_ati_pkg
  16. echo "PET=$PET"
  17. exit
  18. fi