envkernel: support spaces in path (!1770)
Fixes the following error, when running envkernel.sh from a pmbootstrap path with spaces: bash: /home/lofenyy/Root/Cabinet/Projects/Phone: No such file or directory See also: <https://postmarketos.org/troubleshooting>
This commit is contained in:
parent
2df16c5999
commit
f82e4fd66b
|
@ -63,19 +63,19 @@ export_pmbootstrap_dir() {
|
||||||
set_alias_pmbootstrap() {
|
set_alias_pmbootstrap() {
|
||||||
pmbootstrap="$pmbootstrap_dir"/pmbootstrap.py
|
pmbootstrap="$pmbootstrap_dir"/pmbootstrap.py
|
||||||
# shellcheck disable=SC2139
|
# shellcheck disable=SC2139
|
||||||
alias pmbootstrap="$pmbootstrap"
|
alias pmbootstrap="\"$pmbootstrap\""
|
||||||
if [ -e ~/.config/pmbootstrap.cfg ]; then
|
if [ -e ~/.config/pmbootstrap.cfg ]; then
|
||||||
$pmbootstrap work_migrate
|
"$pmbootstrap" work_migrate
|
||||||
else
|
else
|
||||||
echo "NOTE: First run of pmbootstrap, running 'pmbootstrap init'"
|
echo "NOTE: First run of pmbootstrap, running 'pmbootstrap init'"
|
||||||
$pmbootstrap init
|
"$pmbootstrap" init
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export_chroot_device_deviceinfo() {
|
export_chroot_device_deviceinfo() {
|
||||||
chroot="$($pmbootstrap config work)/chroot_native"
|
chroot="$("$pmbootstrap" config work)/chroot_native"
|
||||||
device="$($pmbootstrap config device)"
|
device="$("$pmbootstrap" config device)"
|
||||||
deviceinfo="$pmbootstrap_dir/aports/device/device-$device/deviceinfo"
|
deviceinfo="$pmbootstrap_dir/aports/device/device-$device/deviceinfo"
|
||||||
export chroot device deviceinfo
|
export chroot device deviceinfo
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ initialize_chroot() {
|
||||||
echo "Initializing Alpine chroot (details: 'pmbootstrap log')"
|
echo "Initializing Alpine chroot (details: 'pmbootstrap log')"
|
||||||
|
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
$pmbootstrap -q chroot -- apk -q add \
|
"$pmbootstrap" -q chroot -- apk -q add \
|
||||||
abuild \
|
abuild \
|
||||||
bc \
|
bc \
|
||||||
binutils-"$deviceinfo_arch" \
|
binutils-"$deviceinfo_arch" \
|
||||||
|
@ -138,7 +138,7 @@ mount_kernel_source() {
|
||||||
create_output_folder() {
|
create_output_folder() {
|
||||||
[ -d "$chroot/mnt/linux/.output" ] && return
|
[ -d "$chroot/mnt/linux/.output" ] && return
|
||||||
mkdir -p ".output"
|
mkdir -p ".output"
|
||||||
$pmbootstrap -q chroot -- chown -R pmos:pmos "/mnt/linux/.output"
|
"$pmbootstrap" -q chroot -- chown -R pmos:pmos "/mnt/linux/.output"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue