pack.sh 621 B

123456789101112131415161718192021
  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. rm linux-upstream*
  16. #git add $Header
  17. #git add $Image
  18. #git add $Libc
  19. sudo scp $Header $Image $Libc mk4@192.168.1.8:/var/www/folivier/cube/pack/custom_kernel