summaryrefslogtreecommitdiff
path: root/scripts/inst.sh
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2025-12-10 10:22:45 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2025-12-10 10:22:52 +0800
commit5fd3992ff8eea62967288c639985bfe60b9a171b (patch)
treec5e62533ce32fd1f7f6335c9f210ace1a7ea1374 /scripts/inst.sh
parent89eb19bcbb6f56778d58ad5710ff83feecf2da9b (diff)
Move installation script to setup/linux directory
Diffstat (limited to 'scripts/inst.sh')
-rw-r--r--scripts/inst.sh88
1 files changed, 0 insertions, 88 deletions
diff --git a/scripts/inst.sh b/scripts/inst.sh
deleted file mode 100644
index bbebeb8..0000000
--- a/scripts/inst.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-# Check if required tools are installed
-echo "Checking for required tools..."
-if ! command -v cargo &> /dev/null; then
- echo "Error: cargo is not installed. Please install Rust and Cargo first."
- exit 1
-fi
-if ! command -v git &> /dev/null; then
- echo "Error: git is not installed. Please install git first."
- exit 1
-fi
-
-# Set installation directory to current directory
-echo "Installation directory set to current directory: $(pwd)"
-install_dir="$(pwd)"
-
-# Clone or update repos
-echo "Cloning or updating repositories..."
-mkdir -p "$install_dir"
-cd "$install_dir"
-
-# Function to clone or pull repository
-clone_or_pull() {
- local repo_url="$1"
- local repo_name=$(basename "$repo_url")
-
- if [ -d "$repo_name" ]; then
- echo "Repository $repo_name already exists, pulling latest changes..."
- cd "$repo_name"
- git pull origin main
- cd ..
- else
- echo "Cloning $repo_name..."
- git clone "$repo_url"
- fi
-}
-
-# Clone or update repositories
-clone_or_pull https://github.com/JustEnoughVCS/CommandLine
-clone_or_pull https://github.com/JustEnoughVCS/VersionControl
-
-# Setup VersionControl repo
-echo "Setting up VersionControl..."
-cd VersionControl
-chmod +x setup.sh
-./setup.sh
-
-# Build CLI
-echo "Building CLI..."
-cd ../CommandLine
-cargo build --release
-cargo export
-
-# Configure shell to include CLI in PATH
-echo "Now adding JustEnoughVCS CLI to your environment. Please select your target shell:"
-echo "1) ~/.zshrc (Zsh)"
-echo "2) ~/.bashrc (Bash)"
-echo "3) ~/.config/fish/config.fish (Fish)"
-echo "4) Skip shell configuration"
-echo -n "Enter your choice (1-4): "
-read choice
-
-case $choice in
- 1)
- config_file="$HOME/.zshrc"
- ;;
- 2)
- config_file="$HOME/.bashrc"
- ;;
- 3)
- config_file="$HOME/.config/fish/config.fish"
- ;;
- 4)
- echo "Skipping shell configuration."
- echo "Installation completed! You can manually add the CLI to your PATH later."
- exit 0
- ;;
- *)
- echo "Invalid choice. Skipping shell configuration."
- exit 0
- ;;
-esac
-
-cli_path="$(pwd)/export/jv_cli.sh"
-echo "# JustEnoughVCS CLI" >> "$config_file"
-echo "source \"$cli_path\"" >> "$config_file"
-echo "CLI has been added to $config_file"
-echo "Please restart your shell or run: source $config_file"
-echo "Installation completed successfully!"