pack.sh 511 B

12345678910111213141516171819
  1. #!/bin/bash
  2. Header=$(ls -t -U | grep -m 1 "linux-header")
  3. Image=$(ls -t -U | grep -m 1 "linux-image")
  4. Libc=$(ls -t -U | grep -m 1 "linux-libc")
  5. version=$(ls linux-libc-dev_5.15.*-custom-1_amd64.deb | sed "s/linux-libc-dev_//g" | sed "s/custom.*/custom/g")
  6. if [ -f ksource.txt ]
  7. then
  8. rm ksource.txt
  9. fi
  10. touch ksource.txt
  11. echo "KHeader=$Header" >>ksource.txt
  12. echo "KImage=$Image" >>ksource.txt
  13. echo "KLibc=$Libc" >>ksource.txt
  14. echo "KLversion=$version" >>ksource.txt
  15. git add $Header
  16. git add $Image
  17. git add $Libc