common: install rustup into /opt/rustup

To avoid long-running chown's per https://github.com/dockcross/dockcross/issues/901
This commit is contained in:
Matt McCormick
2025-10-09 08:17:27 -04:00
parent 98e6c48697
commit 63e91f59aa
2 changed files with 5 additions and 7 deletions
-7
View File
@@ -32,13 +32,6 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then
export HOME=/home/${BUILDER_USER}
shopt -s dotglob
# Move rustup/cargo directories as they are large, and not needed as root
if [[ -d /root/.rustup ]]; then
mv -t $HOME/ /root/.rustup
fi
if [[ -d /root/.cargo ]]; then
mv -t $HOME/ /root/.cargo
fi
# Copy the rest
cp -r /root/* $HOME/
chown -R $BUILDER_UID:$BUILDER_GID $HOME