mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Some cleanup
This commit is contained in:
parent
24af6f21eb
commit
b0f392522b
19 changed files with 286 additions and 8 deletions
|
|
@ -8,7 +8,8 @@ param(
|
|||
)
|
||||
|
||||
$Version = $env:SAFE_CHAIN_VERSION # Will be fetched from latest release if not set
|
||||
$InstallDir = Join-Path $env:USERPROFILE ".safe-chain\bin"
|
||||
$SafeChainBase = if ($env:SAFE_CHAIN_DIR) { $env:SAFE_CHAIN_DIR } else { Join-Path $env:USERPROFILE ".safe-chain" }
|
||||
$InstallDir = Join-Path $SafeChainBase "bin"
|
||||
$RepoUrl = "https://github.com/AikidoSec/safe-chain"
|
||||
|
||||
# Ensure TLS 1.2 is enabled for downloads
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ set -e # Exit on error
|
|||
|
||||
# Configuration
|
||||
VERSION="${SAFE_CHAIN_VERSION:-}" # Will be fetched from latest release if not set
|
||||
INSTALL_DIR="${HOME}/.safe-chain/bin"
|
||||
SAFE_CHAIN_BASE="${SAFE_CHAIN_DIR:-${HOME}/.safe-chain}"
|
||||
INSTALL_DIR="${SAFE_CHAIN_BASE}/bin"
|
||||
REPO_URL="https://github.com/AikidoSec/safe-chain"
|
||||
|
||||
# Colors for output
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# Use HOME on Unix, USERPROFILE on Windows (PowerShell Core is cross-platform)
|
||||
$HomeDir = if ($env:HOME) { $env:HOME } else { $env:USERPROFILE }
|
||||
$DotSafeChain = Join-Path $HomeDir ".safe-chain"
|
||||
$DotSafeChain = if ($env:SAFE_CHAIN_DIR) { $env:SAFE_CHAIN_DIR } else { Join-Path $HomeDir ".safe-chain" }
|
||||
$InstallDir = Join-Path $DotSafeChain "bin"
|
||||
|
||||
# Helper functions
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
set -e # Exit on error
|
||||
|
||||
# Configuration
|
||||
DOT_SAFE_CHAIN="${HOME}/.safe-chain"
|
||||
DOT_SAFE_CHAIN="${SAFE_CHAIN_DIR:-${HOME}/.safe-chain}"
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
|
|
@ -163,6 +163,7 @@ main() {
|
|||
else
|
||||
info "Installation directory $DOT_SAFE_CHAIN does not exist. Nothing to remove."
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue