mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* start consolidating * add start-cli flash-os * combine install and setup and refactor all * use http * undo mock * fix translation * translations * use dialogservice wrapper * better ST messaging on setup * only warn on update if breakages (#3097) * finish setup wizard and ui language-keyboard feature * fix typo * wip: localization * remove start-tunnel readme * switch to posix strings for language internal * revert mock * translate backend strings * fix missing about text * help text for args * feat: add "Add new gateway" option (#3098) * feat: add "Add new gateway" option * Update web/projects/ui/src/app/routes/portal/components/form/controls/select.component.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add translation --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Matt Hill <mattnine@protonmail.com> * fix dns selection * keyboard keymap also * ability to shutdown after install * revert mock * working setup flow + manifest localization * (mostly) redundant localization on frontend * version bump * omit live medium from disk list and better space management * ignore missing package archive on 035 migration * fix device migration * add i18n helper to sdk * fix install over 0.3.5.1 * fix grub config --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com> Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
79 lines
1.7 KiB
Bash
Executable File
79 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
source ./builder-alias.sh
|
|
|
|
set -ea
|
|
|
|
INSTALL=false
|
|
while [[ $# -gt 0 ]]; do
|
|
case $1 in
|
|
--install)
|
|
INSTALL=true
|
|
shift
|
|
;;
|
|
*)
|
|
>&2 echo "Unknown option: $1"
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
shopt -s expand_aliases
|
|
|
|
PROFILE=${PROFILE:-release}
|
|
if [ "${PROFILE}" = "release" ]; then
|
|
BUILD_FLAGS="--release"
|
|
else
|
|
if [ "$PROFILE" != "debug" ]; then
|
|
>&2 echo "Unknown profile $PROFILE: falling back to debug..."
|
|
PROFILE=debug
|
|
fi
|
|
fi
|
|
|
|
if [ -z "${ARCH:-}" ]; then
|
|
ARCH=$(uname -m)
|
|
fi
|
|
|
|
if [ "$ARCH" = "arm64" ]; then
|
|
ARCH="aarch64"
|
|
fi
|
|
|
|
RUST_ARCH="$ARCH"
|
|
if [ "$ARCH" = "riscv64" ]; then
|
|
RUST_ARCH="riscv64gc"
|
|
fi
|
|
|
|
if [ -z "${KERNEL_NAME:-}" ]; then
|
|
KERNEL_NAME=$(uname -s)
|
|
fi
|
|
|
|
if [ -z "${TARGET:-}" ]; then
|
|
if [ "$KERNEL_NAME" = "Linux" ]; then
|
|
TARGET="$RUST_ARCH-unknown-linux-musl"
|
|
elif [ "$KERNEL_NAME" = "Darwin" ]; then
|
|
TARGET="$RUST_ARCH-apple-darwin"
|
|
else
|
|
>&2 echo "unknown kernel $KERNEL_NAME"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
cd ../..
|
|
FEATURES="$(echo "${ENVIRONMENT:-}" | sed 's/-/,/g')"
|
|
RUSTFLAGS=""
|
|
if [[ "${ENVIRONMENT:-}" =~ (^|-)console($|-) ]]; then
|
|
RUSTFLAGS="--cfg tokio_unstable"
|
|
fi
|
|
|
|
echo "FEATURES=\"$FEATURES\""
|
|
echo "RUSTFLAGS=\"$RUSTFLAGS\""
|
|
rust-zig-builder cargo zigbuild --manifest-path=./core/Cargo.toml $BUILD_FLAGS --features=$FEATURES --locked --bin start-cli --target=$TARGET
|
|
if [ "$(ls -nd "core/target/$TARGET/$PROFILE/start-cli" | awk '{ print $3 }')" != "$UID" ]; then
|
|
rust-zig-builder sh -c "cd core && chown -R $UID:$UID target && chown -R $UID:$UID /usr/local/cargo"
|
|
fi
|
|
|
|
if [ "$INSTALL" = "true" ]; then
|
|
cp "core/target/$TARGET/$PROFILE/start-cli" ~/.cargo/bin/start-cli
|
|
fi |