ubuntu-mainline-kernel.sh
ubuntu-mainline-kernel.sh copied to clipboard
Minor bug fix: on requesting uninstall permission, print each package on a new line
Currently when i use the "umk -u" option, i'm asked if i want to uninstall a series of packages, listed as below:
linux-headers-5.7.5-050705:amd64 linux-headers-5.7.5-050705:all linux-headers-5.7.5-050705-generic:amd64 linux-headers-5.7.5-050705-generic:all linux-image-5.7.5-050705-generic:amd64 linux-image-unsigned-5.7.5-050705-generic:amd64 linux-modules-5.7.5-050705-generic:amd64
This is not so easy to read, it would be much easier to do so if each package were printed on a new line, like so: linux-headers-5.7.5-050705:amd64 linux-headers-5.7.5-050705:all linux-headers-5.7.5-050705-generic:amd64 linux-headers-5.7.5-050705-generic:all linux-image-5.7.5-050705-generic:amd64 linux-image-unsigned-5.7.5-050705-generic:amd64 linux-modules-5.7.5-050705-generic:amd64
Thanks
As an aside, only four of those seven packages are installed. Why does it list the others?
I took a look through the script, plus did some Bash learning. From what I gather, when using the "$@" parameter, setting "IFS" to a character will separate the instances of the list (the packages to be uninstalled) with that character. In the script, you set "IFS" to "$'\n'" on line 799, which should thus split the list of packages to be installed, using the newline character. But it doesn't and I'm not sure why.
I think it's related to the form of the "cut" command on line 802, using " " as a delimiter may be removing the newline character