This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # ---------------------------------------------------------------------------- | |
| # ensure_clean_venv_here.sh | |
| # Recreate a clean, non-relocatable-safe Python venv for the current project | |
| # and fix common issues (broken shebangs, symlinked python, missing pip). | |
| # Also optionally configures CNTLM proxy for pip during this run. | |
| # | |
| # Copyright (c) 2025 [Yorga Babuscan](yorgabr@gmail.com) | |
| # | |
| # License: GNU General Public License v3.0 or later (GPL-3.0+) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function purge-any-pending-job {Get-Job | Remove-Job} | |
| $measure_mirror_latency = { | |
| Param([string] $argument) | |
| $mirror_url = ($argument -split ";")[0] | |
| $sum_url = "$($mirror_url)x86_64/sha512.sum" | |
| $req = [System.Net.WebRequest]::Create($sum_url) | |
| $req.Timeout = 2000 | |
| try { | |
| $dur = (Measure-Command { |