Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install script #4

Open
BustedSec opened this issue Jul 10, 2024 · 0 comments
Open

install script #4

BustedSec opened this issue Jul 10, 2024 · 0 comments

Comments

@BustedSec
Copy link

#!/bin/bash

Define the repository URL and the target directory

REPO_URL="https://github.com/Bigregsr/BTCSteroids.git"
TARGET_DIR="BTCSteroids"

Clone the repository

echo "Cloning the repository..."
git clone $REPO_URL

Navigate to the project directory

cd $TARGET_DIR

Check if go.mod exists, if not, initialize a new Go module

if [ ! -f "go.mod" ]; then
echo "Initializing a new Go module..."
go mod init github.com/Bigregsr/BTCSteroids
fi

Install dependencies

echo "Installing dependencies..."
go mod tidy

Fix import paths

echo "Fixing import paths..."
sed -i 's|BTCSteroids/steroids|github.com/Bigregsr/BTCSteroids/steroids|g' main.go
sed -i 's|BTCSteroids/electrum|github.com/Bigregsr/BTCSteroids/electrum|g' steroids/.go
sed -i 's|BTCSteroids/operations|github.com/Bigregsr/BTCSteroids/operations|g' steroids/
.go
sed -i 's|BTCSteroids/services|github.com/Bigregsr/BTCSteroids/services|g' steroids/*.go

Build the project

echo "Building the project..."
go build -o btcsteroids

Run the executable

if [ -f "./btcsteroids" ]; then
echo "Running the executable..."
./btcsteroids
else
echo "Build failed, executable not found."
fi

Notify completion

echo "BTCSteroids installation and execution completed."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant