mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
reduce reliance on sudo
This commit is contained in:
@@ -28,15 +28,12 @@ set +e
|
|||||||
fail=
|
fail=
|
||||||
echo "FEATURES=\"$FEATURES\""
|
echo "FEATURES=\"$FEATURES\""
|
||||||
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
||||||
if ! rust-musl-builder sh -c "(cd core && cargo build --release --no-default-features --features container-runtime,$FEATURES --locked --bin containerbox --target=$ARCH-unknown-linux-musl)"; then
|
if ! rust-musl-builder sh -c "cd core && cargo build --release --no-default-features --features container-runtime,$FEATURES --locked --bin containerbox --target=$ARCH-unknown-linux-musl && chown -R $UID:$UID target && chown -R $UID:$UID /root/.cargo"; then
|
||||||
fail=true
|
fail=true
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
cd core
|
cd core
|
||||||
|
|
||||||
sudo chown -R $USER target
|
|
||||||
sudo chown -R $USER ~/.cargo
|
|
||||||
|
|
||||||
if [ -n "$fail" ]; then
|
if [ -n "$fail" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -28,15 +28,12 @@ set +e
|
|||||||
fail=
|
fail=
|
||||||
echo "FEATURES=\"$FEATURES\""
|
echo "FEATURES=\"$FEATURES\""
|
||||||
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
||||||
if ! rust-musl-builder sh -c "(cd core && cargo build --release --no-default-features --features cli,registry,$FEATURES --locked --bin registrybox --target=$ARCH-unknown-linux-musl)"; then
|
if ! rust-musl-builder sh -c "cd core && cargo build --release --no-default-features --features cli,registry,$FEATURES --locked --bin registrybox --target=$ARCH-unknown-linux-musl && chown -R $UID:$UID target && chown -R $UID:$UID /root/.cargo"; then
|
||||||
fail=true
|
fail=true
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
cd core
|
cd core
|
||||||
|
|
||||||
sudo chown -R $USER target
|
|
||||||
sudo chown -R $USER ~/.cargo
|
|
||||||
|
|
||||||
if [ -n "$fail" ]; then
|
if [ -n "$fail" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -28,15 +28,12 @@ set +e
|
|||||||
fail=
|
fail=
|
||||||
echo "FEATURES=\"$FEATURES\""
|
echo "FEATURES=\"$FEATURES\""
|
||||||
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
||||||
if ! rust-musl-builder sh -c "(cd core && cargo build --release --no-default-features --features cli,daemon,$FEATURES --locked --bin startbox --target=$ARCH-unknown-linux-musl)"; then
|
if ! rust-musl-builder sh -c "cd core && cargo build --release --no-default-features --features cli,daemon,$FEATURES --locked --bin startbox --target=$ARCH-unknown-linux-musl && chown -R $UID:$UID target && chown -R $UID:$UID /root/.cargo"; then
|
||||||
fail=true
|
fail=true
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
cd core
|
cd core
|
||||||
|
|
||||||
sudo chown -R $USER target
|
|
||||||
sudo chown -R $USER ~/.cargo
|
|
||||||
|
|
||||||
if [ -n "$fail" ]; then
|
if [ -n "$fail" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user