Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 39b2c00

Browse files
committed
chore: Update rce-engine version to 1.2.1
1 parent 51302c4 commit 39b2c00

File tree

5 files changed

+69
-69
lines changed

5 files changed

+69
-69
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rce-engine"
3-
version = "1.2.0"
3+
version = "1.2.1"
44
authors = ["Success Kingsley <hello@xosnrdev.tech>"]
55
edition = "2021"
66

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ pkgs ? import <nixpkgs> { } }:
22
pkgs.rustPlatform.buildRustPackage rec {
33
pname = "rce-engine";
4-
version = "1.2.0";
4+
version = "1.2.1";
55
cargoLock.lockFile = ./Cargo.lock;
66
src = pkgs.lib.cleanSource ./.;
77
}

docs/install/ubuntu-22.04.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ usermod -aG docker rce
2828
```bash
2929
mkdir /home/rce/bin
3030
cd /home/rce/bin
31-
wget https://github.com/toolkithub/rce-engine/releases/download/v.1.2.0/rce-engine_linux-x64.tar.gz
31+
wget https://github.com/toolkithub/rce-engine/releases/download/v.1.2.1/rce-engine_linux-x64.tar.gz
3232
tar -zxf rce-engine_linux-x64.tar.gz
3333
rm rce-engine_linux-x64.tar.gz
3434
chown -R rce:rce /home/rce/bin

scripts/install.sh

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#+---------------------------------------------------------------------------------------------------------------+
44
# Author: Success Kingsley <hello@xosnrdev.tech>
55
# Last Updated: 2024-08-09
6-
# Version: 1.2.0
6+
# Version: 1.2.1
77
# License: MIT
88
# Description: This script installs the rce-engine on an Ubuntu 22.04 or latest machine.
99
# Usage: curl -fsSL https://raw.githubusercontent.com/toolkithub/rce-engine/main/scripts/install.sh | bash
@@ -13,12 +13,12 @@ set -e
1313

1414
# Function to log messages
1515
log() {
16-
echo -e "\033[1;34m[INFO]\033[0m $1"
16+
echo -e "\033[1;34m[INFO]\033[0m $1"
1717
}
1818

1919
# Function to log errors
2020
error() {
21-
echo -e "\033[1;31m[ERROR]\033[0m $1" >&2
21+
echo -e "\033[1;31m[ERROR]\033[0m $1" >&2
2222
}
2323

2424
# Update package list
@@ -29,10 +29,10 @@ sudo apt update
2929
pkgs=("curl" "docker.io" "runsc" "apt-transport-https" "ca-certificates" "gnupg-agent" "software-properties-common")
3030

3131
for pkg in "${pkgs[@]}"; do
32-
if ! dpkg -l | grep -q "^ii ${pkg}"; then
33-
log "Installing ${pkg}..."
34-
sudo apt-get install -y ${pkg} || error "Failed to install ${pkg}"
35-
fi
32+
if ! dpkg -l | grep -q "^ii ${pkg}"; then
33+
log "Installing ${pkg}..."
34+
sudo apt-get install -y ${pkg} || error "Failed to install ${pkg}"
35+
fi
3636
done
3737

3838
# Install gVisor
@@ -74,7 +74,7 @@ sudo mkdir -p /home/rce/bin
7474
cd /home/rce/bin
7575

7676
log "Downloading rce-engine binary..."
77-
curl -LO https://github.com/toolkithub/rce-engine/releases/download/v1.2.0/rce-engine_linux-x64.tar.gz || error "Failed to download rce-engine binary"
77+
curl -LO https://github.com/toolkithub/rce-engine/releases/download/v1.2.1/rce-engine_linux-x64.tar.gz || error "Failed to download rce-engine binary"
7878

7979
log "Extracting rce-engine binary..."
8080
sudo tar -zxf rce-engine_linux-x64.tar.gz || error "Failed to extract rce-engine binary"
@@ -100,83 +100,83 @@ sudo systemctl start rce-engine.service || error "Failed to start rce-engine ser
100100
# This phase of the script installs the rce-images for supported languages interactively.
101101
# see https://github.com/toolkithub/rce-images
102102
languages=(
103-
"Assembly" "Ats" "Bash" "C" "Clojure" "Cobol" "CoffeeScript" "Cpp"
104-
"Crystal" "Csharp" "D" "Elixir" "Elm" "Erlang" "Fsharp" "Go"
105-
"Groovy" "Haskell" "Idris" "Java" "JavaScript" "Julia" "Kotlin"
106-
"Lua" "Mercury" "Nim" "Ocaml" "Perl" "Php" "Python" "Raku"
107-
"Ruby" "Rust" "SaC" "Scala" "Swift" "TypeScript"
103+
"Assembly" "Ats" "Bash" "C" "Clojure" "Cobol" "CoffeeScript" "Cpp"
104+
"Crystal" "Csharp" "D" "Elixir" "Elm" "Erlang" "Fsharp" "Go"
105+
"Groovy" "Haskell" "Idris" "Java" "JavaScript" "Julia" "Kotlin"
106+
"Lua" "Mercury" "Nim" "Ocaml" "Perl" "Php" "Python" "Raku"
107+
"Ruby" "Rust" "SaC" "Scala" "Swift" "TypeScript"
108108
)
109109

110110
# Display supported languages
111111
display_supported_languages() {
112-
echo -e "\n\033[1;34mSupported Languages (select by number):\033[0m"
113-
for i in "${!languages[@]}"; do
114-
printf "\033[1;32m%2d.\033[0m \033[1;37m%-15s\033[0m" $((i+1)) "${languages[${i}]}"
115-
if (( (i + 1) % 6 == 0 )); then
116-
echo
117-
fi
118-
done
119-
echo -e "\n"
112+
echo -e "\n\033[1;34mSupported Languages (select by number):\033[0m"
113+
for i in "${!languages[@]}"; do
114+
printf "\033[1;32m%2d.\033[0m \033[1;37m%-15s\033[0m" $((i + 1)) "${languages[${i}]}"
115+
if (((i + 1) % 6 == 0)); then
116+
echo
117+
fi
118+
done
119+
echo -e "\n"
120120
}
121121

122122
# Convert string to lowercase
123123
convert_to_lowercase() {
124-
echo "${1}" | tr '[:upper:]' '[:lower:]'
124+
echo "${1}" | tr '[:upper:]' '[:lower:]'
125125
}
126126

127127
# Trim whitespace from a string
128128
trim_whitespace() {
129-
echo "${1}" | tr -d '[:space:]'
129+
echo "${1}" | tr -d '[:space:]'
130130
}
131131

132132
# Pull Docker image for the given language
133133
pull_language_image() {
134-
local language=$1
135-
log "Pulling image for ${language}..."
136-
if ! docker pull ghcr.io/toolkithub/rce-images-$(convert_to_lowercase "${language}"):edge; then
137-
error "Failed to pull image for ${language}"
138-
return 1
139-
fi
134+
local language=$1
135+
log "Pulling image for ${language}..."
136+
if ! docker pull ghcr.io/toolkithub/rce-images-$(convert_to_lowercase "${language}"):edge; then
137+
error "Failed to pull image for ${language}"
138+
return 1
139+
fi
140140
}
141141

142142
# Main function
143143
main() {
144-
display_supported_languages
145-
146-
# Prompt user input
147-
read -p "Enter the number corresponding to the language(s) you'd like to install (comma-separated), or press Enter to install all: " language_input
148-
language_input=$(trim_whitespace "${language_input}")
149-
150-
is_valid_input=true
151-
if [ -z "${language_input}" ]; then
152-
for language in "${languages[@]}"; do
153-
pull_language_image "${language}" &
154-
done
155-
wait
156-
else
157-
IFS=',' read -r -a indices <<< "${language_input}"
158-
is_valid_input=true
159-
160-
for index in "${indices[@]}"; do
161-
if ! [[ ${index} =~ ^[0-9]+$ ]] || (( index < 1 || index > ${#languages[@]} )); then
162-
error "Unsupported language index: ${index}"
163-
is_valid_input=false
164-
break
165-
fi
166-
done
167-
168-
if [ "${is_valid_input}" = true ]; then
169-
for index in "${indices[@]}"; do
170-
language="${languages[$((index-1))]}"
171-
pull_language_image "${language}" &
172-
done
173-
wait
174-
log "Successfully pulled images for selected languages."
175-
else
176-
error "Invalid input. Please enter a valid number or a comma-separated list of numbers."
177-
main
178-
fi
179-
fi
144+
display_supported_languages
145+
146+
# Prompt user input
147+
read -p "Enter the number corresponding to the language(s) you'd like to install (comma-separated), or press Enter to install all: " language_input
148+
language_input=$(trim_whitespace "${language_input}")
149+
150+
is_valid_input=true
151+
if [ -z "${language_input}" ]; then
152+
for language in "${languages[@]}"; do
153+
pull_language_image "${language}" &
154+
done
155+
wait
156+
else
157+
IFS=',' read -r -a indices <<<"${language_input}"
158+
is_valid_input=true
159+
160+
for index in "${indices[@]}"; do
161+
if ! [[ ${index} =~ ^[0-9]+$ ]] || ((index < 1 || index > ${#languages[@]})); then
162+
error "Unsupported language index: ${index}"
163+
is_valid_input=false
164+
break
165+
fi
166+
done
167+
168+
if [ "${is_valid_input}" = true ]; then
169+
for index in "${indices[@]}"; do
170+
language="${languages[$((index - 1))]}"
171+
pull_language_image "${language}" &
172+
done
173+
wait
174+
log "Successfully pulled images for selected languages."
175+
else
176+
error "Invalid input. Please enter a valid number or a comma-separated list of numbers."
177+
main
178+
fi
179+
fi
180180
}
181181

182182
main

0 commit comments

Comments
 (0)