Skip to content

Commit

Permalink
Meta: Fix build-root-filesystem.sh on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoskiv authored and awesomekling committed Sep 20, 2020
1 parent 03a27bc commit f0fdbb1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Meta/build-root-filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ utmp_gid=5
window_uid=13
window_gid=13

CP="cp"

# cp on macOS does not support the -d option.
# gcp comes with coreutils, which is already a dependency.
if [ "$(uname -s)" = "Darwin" ]; then
CP=gcp
fi

die() {
echo "die: $*"
exit 1
Expand All @@ -25,8 +33,8 @@ fi
umask 0022

printf "installing base system... "
cp -PdR "$SERENITY_ROOT"/Base/* mnt/
cp -PdR Root/* mnt/
$CP -PdR "$SERENITY_ROOT"/Base/* mnt/
$CP -PdR Root/* mnt/
# If umask was 027 or similar when the repo was cloned,
# file permissions in Base/ are too restrictive. Restore
# the permissions needed in the image.
Expand Down

0 comments on commit f0fdbb1

Please sign in to comment.