Skip to content

Instantly share code, notes, and snippets.

@xPaw
Last active August 22, 2020 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xPaw/d560ddaf9bf1b5d275d95ca1988c64cb to your computer and use it in GitHub Desktop.
Save xPaw/d560ddaf9bf1b5d275d95ca1988c64cb to your computer and use it in GitHub Desktop.
<?php
declare(strict_types=1);
// Alternatively manifest_ios
$manifest = file_get_contents( 'https://raw.githubusercontent.com/SteamDatabase/GameTracking-Underlords-Android/master/manifest_android.json' );
$manifest = json_decode( $manifest, true );
$out = "#!/bin/bash\n";
foreach( $manifest[ 'assets' ] as $assetName => $asset )
{
if( strpos( $assetName, 'pak01' ) === false )
{
continue;
}
$out .= "echo '=========== Downloading {$assetName}'\n";
$out .= 'curl --create-dirs -o ' . escapeshellarg( $assetName ) . ' ' . escapeshellarg( $manifest[ 'cdnroot' ] . $assetName ) . "\n";
}
file_put_contents( 'download_underlords.sh', $out );
echo 'bash ./download_underlords.sh' . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment