From d68664141dbc2a1c2a9461acf08c47dd7315a47d Mon Sep 17 00:00:00 2001 From: ALEZ-DEV Date: Thu, 27 Jun 2024 23:20:50 +0200 Subject: [PATCH] edit build.sh --- build.sh | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/build.sh b/build.sh index 4c5d4cb..e77c5b9 100644 --- a/build.sh +++ b/build.sh @@ -1,12 +1,34 @@ -sudo steamos-readonly disable -curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh -s -- --prefix /usr -sudo steamos-readonly enable +#!/bin/bash + +while true; do + read -p "Are you on steam deck? (y/n): " confirm + if [[ $confirm =~ ^yes$|^y$|^Y$|^no$|^n$|^N$ ]]; then + if [[ $confirm =~ ^yes$|^y$|^Y$ ]]; then + isSteamdeck=true + else + isSteamdeck=false + fi + break + fi +done + +if $isSteamdeck; then + sudo steamos-readonly disable +fi + +if ! command -v distrobox &>/dev/null; then + curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh +fi + +if $isSteamdeck; then + sudo steamos-readonly enable +fi + xhost +si:localuser:$USER >/dev/null -distrobox create && distrobox enter -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -sudo dnf install pkg-config openssl-devel -sudo dnf install llvm-devel -sudo dnf install gcc-c++.x86_64 -rustup update -rustup toolchain install 1.78.0 -cargo install --git https://github.com/ALEZ-DEV/Babylonia-terminal --bin + +distroname="babylonia-terminal-image" +distrobox create --image registry.fedoraproject.org/fedora-toolbox:38 -Y --name $distroname +distrobox enter --name $distroname -- sudo dnf install -y pkg-config openssl-devel llvm-devel gcc-c++.x86_64 +distrobox enter --name $distroname -- rustup update +distrobox enter --name $distroname -- rustup toolchain install 1.78.0 +distrobox enter --name $distroname -- cargo install --git https://github.com/ALEZ-DEV/Babylonia-terminal --bin