Skip to content

Commit

Permalink
fix retrieval of manifest id from depot downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Jan 19, 2025
1 parent 4b4c0e9 commit 3332421
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions scripts/helper_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,20 @@ EOL
}

GetManifestIdDepotDownloader() {
local directory="$1"
local filename=$(ls -1 "$directory" | head -n 1)

if [ -z "$filename" ]; then
echo "No file found in directory" >&2
local depotManifestDirectory="$1"
local manifestFile
manifestFile=$(find "$depotManifestDirectory" -type f -name "manifest_2394012_*.txt" | head -n 1)

if [ -z "$manifestFile" ]; then
echo "DepotDownloader manifest file not found."
return 1

else
local manifestId
manifestId=$(grep -oP 'Manifest ID / date\s*:\s*\K[0-9]+' "$manifestFile")

echo "$manifestId"
fi

local temp=${filename#manifest_*_}
local manifest_id=${temp%%.*}

echo "$manifest_id"
}

# Returns 0 if Update Required
Expand Down

0 comments on commit 3332421

Please sign in to comment.