lock-file

This commit is contained in:
Lanta 2023-11-13 10:06:27 +01:00
parent 957ec7c486
commit 1f8c614f49
2 changed files with 10 additions and 8 deletions

View file

@ -1,6 +1,3 @@
. .\..\includes\ps1\lockfile.ps1
new-lock
if ($PSScriptRoot.length -eq 0) {
$scriptroot = Get-Location
@ -9,6 +6,10 @@ else {
$scriptroot = $PSScriptRoot
}
. $scriptroot\..\includes\ps1\lockfile.ps1
new-lock
function Get-Change {
param (
[double]$OldWinRatio,
@ -87,7 +88,7 @@ foreach ($player in $all_player_matches) {
$player_name = $player.playername
foreach ($match in $player.player_matches) {
write-output "Analyzing match $($match.id) for player $player_name"
if (!(Test-Path -path "$scriptroot/../data/killstats/$($match.id)_$player_name.json" )) {
$telemetryfile = "$scriptroot/../data/telemetry_cache/$($match.telemetry_url.split("/")[-1])"
if (!(test-path -Path $telemetryfile)) {

View file

@ -1,12 +1,13 @@
. .\..\includes\ps1\lockfile.ps1
new-lock
if ($PSScriptRoot.length -eq 0) {
if ($PSScriptRoot.length -eq 0) {
$scriptroot = Get-Location
}
else {
$scriptroot = $PSScriptRoot
}
. $scriptroot\..\includes\ps1\lockfile.ps1
new-lock
# Read the content of the file as a single string
$fileContent = Get-Content -Path "$scriptroot/../config/config.php" -Raw