Parcourir la source

feat: Adding Rust 1.68.2, README.md and setup script.

Matthias Ladkau il y a 1 an
commit
6b87ac2af9
4 fichiers modifiés avec 71 ajouts et 0 suppressions
  1. 1 0
      .gitignore
  2. 31 0
      README.md
  3. BIN
      setup/pkg/linux/rust-1.68.2-x86_64-unknown-linux-gnu.tar.gz
  4. 39 0
      setup/setup.sh

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/linux/

+ 31 - 0
README.md

@@ -0,0 +1,31 @@
+Rust Development Environment
+==
+This repository contains a Rust development environment for offline installation.
+
+Rust Version: 1.68.2
+
+Installation:
+--
+1. Git clone into a directory:
+```
+~/ > git clone https://devt.de/krotik/env-rust.git
+```
+
+2. Run setup.sh:
+```
+~/env-rust/setup/ > setup.sh
+```
+
+3. Run install.sh:
+```
+~/env-rust/linux/rust-x.xx.x-x86_64-unknown-linux-gnu/ > sudo ./install.sh
+```
+The Rust commands e.g. `rustc` should now be available.
+
+
+Uninstallation:
+--
+1. Git clone into a directory:
+```
+~/env-rust/linux/rust-x.xx.x-x86_64-unknown-linux-gnu/ > sudo ./install.sh --uninstall
+```

BIN
setup/pkg/linux/rust-1.68.2-x86_64-unknown-linux-gnu.tar.gz


+ 39 - 0
setup/setup.sh

@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# setup.sh - Setup Go development software.
+
+PATH_CURRENT=`pwd`
+SETUP_ENV_SCRIPT_NAME=setup.sh
+
+# Find out the path of the setup script
+
+if [ $0 == $SETUP_ENV_SCRIPT_NAME ]; then
+    PATH_SETUP_SH="."
+else
+    PATH_SETUP_SH=${0/%\/$SETUP_ENV_SCRIPT_NAME}
+fi
+
+cd $PATH_SETUP_SH/..
+
+# Root dir of env-go
+
+ROOT_PATH=`pwd`
+
+# Define the paths
+
+TARGET_PATH=$ROOT_PATH/linux
+SOURCE_PATH=$ROOT_PATH/setup/pkg/linux
+
+# Extract files in place
+
+rm -fR $TARGET_PATH
+mkdir -p $TARGET_PATH
+
+cd $TARGET_PATH
+for filename in $SOURCE_PATH/*; do
+    echo ${filename}
+    echo ${filename: -7}
+    if [ ${filename: -7} == ".tar.gz" ]; then
+        tar -xvzf ${filename}
+    fi
+done