Skip to content

helpers/envkernel.sh: use "$pmbootstrap" in cross_compiler_version()

Administrator requested to merge newbyte/fix-non-default-pmb-cmd into master

This fixes an issue where if pmbootstrap is accessed via a different command than pmbootstrap on the user's system (I have it set to pmb for example), cross_compiler_version() would try to use a command that doesn't exist. On my system, this results in it always asking if I want to install pmbootstrap every time I run envkerenl.sh.

Before:

$ source ../pmbootstrap/helpers/envkernel.sh 
[sudo] password for neboula: 
error: No such remote 'origin'
pmbootstrap envkernel.sh activated successfully.
 * kernel source:  /mnt/storage/Programming/linux
 * output folder:  /mnt/storage/Programming/linux/.output
 * architecture:   arm (samsung-m0 is armv7)
Install package 'pmbootstrap' to provide command 'pmbootstrap'? [N/y] n

 * cross compile:  
 * aliases: make, kernelroot, pmbootstrap, pmbroot, run-script (see 'type make' etc.)
 * run 'deactivate' to revert all env changes

After:

$ source ../pmbootstrap/helpers/envkernel.sh 
error: No such remote 'origin'
pmbootstrap envkernel.sh activated successfully.
 * kernel source:  /mnt/storage/Programming/linux
 * output folder:  /mnt/storage/Programming/linux/.output
 * architecture:   arm (samsung-m0 is armv7)
[sudo] password for neboula: 
 * cross compile:  armv7-alpine-linux-musleabihf-gcc (Alpine 11.2.1_git20220219)
 * aliases: make, kernelroot, pmbootstrap, pmbroot, run-script (see 'type make' etc.)
 * run 'deactivate' to revert all env changes
Edited by Administrator

Merge request reports

Loading