#!/bin/bash Header=$(ls -t -U | grep -m 1 "linux-header") Image=$(ls -t -U | grep -m 1 "linux-image") Libc=$(ls -t -U | grep -m 1 "linux-libc") version=$(ls linux-libc-dev_5.15.*-custom-1_amd64.deb | sed "s/linux-libc-dev_//g" | sed "s/custom.*/custom/g") if [ -f ksource.txt ] then rm ksource.txt fi touch ksource.txt echo "KHeader=$Header" >>ksource.txt echo "KImage=$Image" >>ksource.txt echo "KLibc=$Libc" >>ksource.txt echo "KLversion=$version" >>ksource.txt echo "kernel_version=kernel_$version.run" >>ksource.txt rm linux-upstream* #git add $Header #git add $Image #git add $Libc ./makeself.run echo "" echo -e "#!/bin/bash" >kernel.sh echo -e "sudo dpkg -i $Libc" >>kernel.sh echo -e "sudo dpkg -i $Header" >>kernel.sh echo -e "sudo dpkg -i $Image" >>kernel.sh chmod +x kernel.sh mkdir pack cp $Libc pack cp $Header pack cp $Image pack cp kernel.sh pack ./makeself-2.5.0/makeself.sh --xz pack/ kernel_$version.run "kernel_$version" ./kernel.sh rm -r pack rm kernel.sh rm -r -f makeself-2.5.0 sudo scp $Header $Image $Libc kernel_$version.run mk4@192.168.1.8:/var/www/folivier/cube/pack/custom_kernel sudo ssh mk4@192.168.1.8 "echo 'B' >/dev/serial0" echo "ne pas oublier:" echo "git commit -a" echo "git push" echo -e ""