@@ -75,14 +75,14 chroot_install_cc() { | |||
|
75 | 75 | if [ -z "${COMPILER_PACKAGES}" ] ; then |
|
76 | 76 | COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }') |
|
77 | 77 | # Install COMPILER_PACKAGES in chroot - NEVER do "${COMPILER_PACKAGES}" -> breaks uboot |
|
78 | chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES} | |
|
78 | chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install "${COMPILER_PACKAGES}" | |
|
79 | 79 | fi |
|
80 | 80 | } |
|
81 | 81 | |
|
82 | 82 | chroot_remove_cc() { |
|
83 | 83 | # Remove c/c++ build environment from the chroot |
|
84 | 84 | if [ -n "${COMPILER_PACKAGES}" ] ; then |
|
85 | chroot_exec apt-get -qq -y --auto-remove purge ${COMPILER_PACKAGES} | |
|
85 | chroot_exec apt-get -qq -y --auto-remove purge "${COMPILER_PACKAGES}" | |
|
86 | 86 | COMPILER_PACKAGES="" |
|
87 | 87 | fi |
|
88 | 88 | } |
@@ -92,8 +92,8 cdr2mask () | |||
|
92 | 92 | { |
|
93 | 93 | # Number of args to shift, 255..255, first non-255 byte, zeroes |
|
94 | 94 | set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0 |
|
95 | [ $1 -gt 1 ] && shift $1 || shift | |
|
96 | echo ${1-0}.${2-0}.${3-0}.${4-0} | |
|
95 | [ "$1" -gt 1 ] && shift "$1" || shift | |
|
96 | echo "${1-0}"."${2-0}"."${3-0}"."${4-0}" | |
|
97 | 97 | } |
|
98 | 98 | |
|
99 | 99 | # GPL v2.0 - #https://github.com/sakaki-/bcmrpi3-kernel-bis/blob/master/conform_config.sh |
@@ -101,7 +101,7 set_kernel_config() { | |||
|
101 | 101 | # flag as $1, value to set as $2, config must exist at "./.config" |
|
102 | 102 | TGT="CONFIG_${1#CONFIG_}" |
|
103 | 103 | REP="${2}" |
|
104 |
if |
|
|
104 | if grep -q "^${TGT}[^_]" .config ; then | |
|
105 | 105 | sed -i "s/^\(${TGT}=.*\|# ${TGT} is not set\)/${TGT}=${REP}/" .config |
|
106 | 106 | else |
|
107 | 107 | echo "${TGT}"="${2}" >> .config |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant