mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
Build: use $SUDO_[UG]ID in build-image-* instead of relying on makeall
This commit is contained in:
parent
c6c7e40bd1
commit
0fa38e4a4a
Notes:
sideshowbarker
2024-07-19 10:02:39 +09:00
Author: https://github.com/jcs Commit: https://github.com/SerenityOS/serenity/commit/0fa38e4a4a5 Pull-request: https://github.com/SerenityOS/serenity/pull/1080
3 changed files with 2 additions and 8 deletions
|
@ -23,7 +23,7 @@ echo "using grub-install at ${grub}"
|
|||
|
||||
echo "setting up disk image..."
|
||||
dd if=/dev/zero of=_disk_image bs=1M count="${DISK_SIZE:-600}" status=none || die "couldn't create disk image"
|
||||
chown 1000:1000 _disk_image || die "couldn't adjust permissions on disk image"
|
||||
chown "$SUDO_UID":"$SUDO_GID" _disk_image || die "couldn't adjust permissions on disk image"
|
||||
echo "done"
|
||||
|
||||
printf "creating loopback device... "
|
||||
|
|
|
@ -16,7 +16,7 @@ if [ "$(uname -s)" = "Darwin" ]; then
|
|||
fi
|
||||
echo "setting up disk image..."
|
||||
qemu-img create _disk_image "${DISK_SIZE:-600}"m || die "couldn't create disk image"
|
||||
chown "$build_user":"$build_group" _disk_image || die "couldn't adjust permissions on disk image"
|
||||
chown "$SUDO_UID":"$SUDO_GID" _disk_image || die "couldn't adjust permissions on disk image"
|
||||
echo "done"
|
||||
|
||||
printf "creating new filesystem... "
|
||||
|
|
|
@ -4,12 +4,6 @@ set -e
|
|||
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
cd "$script_path"
|
||||
|
||||
# Get user and group details for setting qemu disk image ownership
|
||||
build_user=$(id -u)
|
||||
build_group=$(id -g)
|
||||
export build_user
|
||||
export build_group
|
||||
|
||||
fast_mode=
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
|
Loading…
Add table
Reference in a new issue