mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:47:35 +00:00
Meta: Support using rsync to install the root filesystem
Using rsync is significantly faster when we're using an existing image because we only have to copy files which are new or have been updated. This cuts down the image creation time to about a second or two assuming an old image exists.
This commit is contained in:
parent
479905be6c
commit
511ffa8d68
1 changed files with 18 additions and 12 deletions
|
@ -32,9 +32,15 @@ fi
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
printf "installing base system... "
|
printf "installing base system... "
|
||||||
$CP -PdR "$SERENITY_SOURCE_DIR"/Base/* mnt/
|
if command -v rsync >/dev/null; then
|
||||||
|
rsync -aH --inplace "$SERENITY_SOURCE_DIR"/Base/ mnt/
|
||||||
|
rsync -aH --inplace Root/ mnt/
|
||||||
|
else
|
||||||
|
echo "Please install rsync to speed up image creation times, falling back to cp for now"
|
||||||
|
$CP -PdR "$SERENITY_SOURCE_DIR"/Base/* mnt/
|
||||||
|
$CP -PdR Root/* mnt/
|
||||||
|
fi
|
||||||
$CP "$SERENITY_SOURCE_DIR"/Toolchain/Local/i686/i686-pc-serenity/lib/libgcc_s.so mnt/usr/lib/
|
$CP "$SERENITY_SOURCE_DIR"/Toolchain/Local/i686/i686-pc-serenity/lib/libgcc_s.so mnt/usr/lib/
|
||||||
$CP -PdR Root/* mnt/
|
|
||||||
# If umask was 027 or similar when the repo was cloned,
|
# If umask was 027 or similar when the repo was cloned,
|
||||||
# file permissions in Base/ are too restrictive. Restore
|
# file permissions in Base/ are too restrictive. Restore
|
||||||
# the permissions needed in the image.
|
# the permissions needed in the image.
|
||||||
|
@ -108,22 +114,22 @@ chown -R 200:200 mnt/home/nona
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
printf "adding some desktop icons..."
|
printf "adding some desktop icons..."
|
||||||
ln -s /bin/Browser mnt/home/anon/Desktop/
|
ln -sf /bin/Browser mnt/home/anon/Desktop/
|
||||||
ln -s /bin/TextEditor mnt/home/anon/Desktop/
|
ln -sf /bin/TextEditor mnt/home/anon/Desktop/
|
||||||
ln -s /bin/Help mnt/home/anon/Desktop/
|
ln -sf /bin/Help mnt/home/anon/Desktop/
|
||||||
ln -s /home/anon mnt/home/anon/Desktop/Home
|
ln -sf /home/anon mnt/home/anon/Desktop/Home
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
printf "installing shortcuts... "
|
printf "installing shortcuts... "
|
||||||
ln -s Shell mnt/bin/sh
|
ln -sf Shell mnt/bin/sh
|
||||||
ln -s test mnt/bin/[
|
ln -sf test mnt/bin/[
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
printf "installing 'checksum' variants... "
|
printf "installing 'checksum' variants... "
|
||||||
ln -s checksum mnt/bin/md5sum
|
ln -sf checksum mnt/bin/md5sum
|
||||||
ln -s checksum mnt/bin/sha1sum
|
ln -sf checksum mnt/bin/sha1sum
|
||||||
ln -s checksum mnt/bin/sha256sum
|
ln -sf checksum mnt/bin/sha256sum
|
||||||
ln -s checksum mnt/bin/sha512sum
|
ln -sf checksum mnt/bin/sha512sum
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
# Run local sync script, if it exists
|
# Run local sync script, if it exists
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue