#!/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."
#!/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."