Initial commit

This commit is contained in:
ilumos 2017-02-05 22:18:16 +00:00
parent 41bb5fa85d
commit dd3c7e91e7
6 changed files with 472 additions and 0 deletions

7
README.md Normal file → Executable file
View file

@ -1,2 +1,9 @@
# lancache-autofill
Automatically fill a Lancache with content.
# Useful Sites
* [SteamCMD Reference](https://developer.valvesoftware.com/wiki/SteamCMD)
* [SteamCMD Commands and Variables](https://github.com/dgibbs64/SteamCMD-Commands-List/blob/master/steamcmdcommands.txt)
* [jq Reference](https://stedolan.github.io/jq/manual/)

42
autofill.sh Executable file
View file

@ -0,0 +1,42 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PATH_TMP="/tmp/lancache-autofill"
PATH_STEAMCMD="/usr/games/steam/steamcmd.sh"
STEAM_REQUEST_WINDOWS="+@sSteamCmdForcePlatformType windows"
echo "Enter Steam username:"
read STEAM_USERNAME
echo "Clearing data from previous download location..."
rm -r $PATH_TMP
mkdir -p $PATH_TMP
if [ ! -f $DIR/steam/apps_free.json
echo "Getting top 100 Steam apps..."
$DIR/steam/get_top_100_apps.sh
fi
echo "Starting download of free Steam apps..."
readarray -t STEAM_APP_IDS < <(cat $DIR/steam/apps_free.json | jq '.[] | .id' )
for STEAM_APP_ID in "${STEAM_APP_IDS[@]}"
do
STEAM_APP_NAME=$(cat $DIR/steam/apps_free.json | jq --raw-output ".[] | select(.id == $STEAM_APP_ID) | .name")
echo "##################################################################################"
echo "Starting download of $STEAM_APP_NAME (App ID: $STEAM_APP_ID)"
echo "Launching SteamCMD..."
$PATH_STEAMCMD +login $STEAM_USERNAME \
$STEAM_REQUEST_WINDOWS \
+force_install_dir $PATH_TMP/steam/$STEAM_APP_ID \
+app_license_request $STEAM_APP_ID \
+app_update $STEAM_APP_ID validate \
+app_update_cancel 3 \
+quit
echo "Finished download of $STEAM_APP_NAME (App ID: $STEAM_APP_ID)"
echo "##################################################################################"
STEAM_APP_NAME=""
done

7
install.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
apt install -y lib32gcc1 jq
mkdir -p /usr/games/steam
cd /usr/games/steam
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

90
steam/apps_free.json Executable file
View file

@ -0,0 +1,90 @@
[
{
"id": 570,
"name": "Dota 2"
},
{
"id": 440,
"name": "Team Fortress 2"
},
{
"id": 444090,
"name": "Paladins"
},
{
"id": 304930,
"name": "Unturned"
},
{
"id": 230410,
"name": "Warframe"
},
{
"id": 291550,
"name": "Brawlhalla"
},
{
"id": 236390,
"name": "War Thunder"
},
{
"id": 555570,
"name": "Infestation: The New Z"
},
{
"id": 386360,
"name": "SMITE"
},
{
"id": 227940,
"name": "Heroes & Generals"
},
{
"id": 530620,
"name": "Resident Evil 7 / Biohazard 7 Teaser: Beginning Hour"
},
{
"id": 301520,
"name": "Robocraft"
},
{
"id": 238960,
"name": "Path of Exile"
},
{
"id": 304050,
"name": "Trove"
},
{
"id": 363970,
"name": "Clicker Heroes"
},
{
"id": 333930,
"name": "Dirty Bomb"
},
{
"id": 444200,
"name": "World of Tanks Blitz"
},
{
"id": 346900,
"name": "AdVenture Capitalist"
},
{
"id": 291480,
"name": "Warface"
},
{
"id": 218230,
"name": "PlanetSide 2"
},
{
"id": 453480,
"name": "Shadowverse"
},
{
"id": 316010,
"name": "Magic Duels"
}
]

314
steam/apps_paid.json Normal file
View file

@ -0,0 +1,314 @@
[
{
"id": 730,
"name": "Counter-Strike: Global Offensive"
},
{
"id": 271590,
"name": "Grand Theft Auto V"
},
{
"id": 252950,
"name": "Rocket League"
},
{
"id": 4000,
"name": "Garry's Mod"
},
{
"id": 433850,
"name": "H1Z1: King of the Kill"
},
{
"id": 550,
"name": "Left 4 Dead 2"
},
{
"id": 346110,
"name": "ARK: Survival Evolved"
},
{
"id": 252490,
"name": "Rust"
},
{
"id": 72850,
"name": "The Elder Scrolls V: Skyrim"
},
{
"id": 359550,
"name": "Tom Clancy's Rainbow Six Siege"
},
{
"id": 8930,
"name": "Sid Meier's Civilization V"
},
{
"id": 218620,
"name": "PAYDAY 2"
},
{
"id": 431960,
"name": "Wallpaper Engine"
},
{
"id": 105600,
"name": "Terraria"
},
{
"id": 227300,
"name": "Euro Truck Simulator 2"
},
{
"id": 377160,
"name": "Fallout 4"
},
{
"id": 250900,
"name": "The Binding of Isaac: Rebirth"
},
{
"id": 107410,
"name": "Arma 3"
},
{
"id": 322330,
"name": "Don't Starve Together Beta"
},
{
"id": 289070,
"name": "Sid Meiers Civilization® VI"
},
{
"id": 10,
"name": "Counter-Strike"
},
{
"id": 482730,
"name": "Football Manager 2017"
},
{
"id": 381210,
"name": "Dead by Daylight"
},
{
"id": 292030,
"name": "The Witcher 3: Wild Hunt"
},
{
"id": 489830,
"name": "The Elder Scrolls V: Skyrim Special Edition"
},
{
"id": 240,
"name": "Counter-Strike: Source"
},
{
"id": 242760,
"name": "The Forest"
},
{
"id": 221380,
"name": "Age of Empires II: HD Edition"
},
{
"id": 49520,
"name": "Borderlands 2"
},
{
"id": 48700,
"name": "Mount & Blade: Warband"
},
{
"id": 413150,
"name": "Stardew Valley"
},
{
"id": 255710,
"name": "Cities: Skylines"
},
{
"id": 418370,
"name": "RESIDENT EVIL 7 biohazard / BIOHAZARD 7 resident evil"
},
{
"id": 374320,
"name": "DARK SOULS III"
},
{
"id": 222880,
"name": "Insurgency"
},
{
"id": 251570,
"name": "7 Days to Die"
},
{
"id": 620,
"name": "Portal 2"
},
{
"id": 268500,
"name": "XCOM 2"
},
{
"id": 221100,
"name": "DayZ"
},
{
"id": 440900,
"name": "Conan Exiles"
},
{
"id": 232090,
"name": "Killing Floor 2"
},
{
"id": 364360,
"name": "Total War: WARHAMMER"
},
{
"id": 236850,
"name": "Europa Universalis IV"
},
{
"id": 379720,
"name": "DOOM"
},
{
"id": 365590,
"name": "Tom Clancy's The Division"
},
{
"id": 311690,
"name": "Enter the Gungeon"
},
{
"id": 264710,
"name": "Subnautica"
},
{
"id": 391540,
"name": "Undertale"
},
{
"id": 311210,
"name": "Call of Duty: Black Ops III"
},
{
"id": 361420,
"name": "Astroneer Alpha"
},
{
"id": 214950,
"name": "Total War: ROME II - Emperor Edition"
},
{
"id": 394360,
"name": "Hearts of Iron IV"
},
{
"id": 322170,
"name": "Geometry Dash"
},
{
"id": 378120,
"name": "Football Manager 2016"
},
{
"id": 211820,
"name": "Starbound"
},
{
"id": 219740,
"name": "Don't Starve"
},
{
"id": 219640,
"name": "Chivalry: Medieval Warfare"
},
{
"id": 202990,
"name": "Call of Duty: Black Ops II - Multiplayer"
},
{
"id": 231430,
"name": "Company of Heroes 2"
},
{
"id": 295110,
"name": "H1Z1"
},
{
"id": 431240,
"name": "Golf With Friends"
},
{
"id": 321040,
"name": "DiRT 3 Complete Edition"
},
{
"id": 294100,
"name": "RimWorld"
},
{
"id": 10190,
"name": "Call of Duty: Modern Warfare 2 - Multiplayer"
},
{
"id": 281990,
"name": "Stellaris"
},
{
"id": 239140,
"name": "Dying Light"
},
{
"id": 220200,
"name": "Kerbal Space Program"
},
{
"id": 427520,
"name": "Factorio"
},
{
"id": 493340,
"name": "Planet Coaster ®"
},
{
"id": 22380,
"name": "Fallout: New Vegas"
},
{
"id": 244850,
"name": "Space Engineers"
},
{
"id": 225540,
"name": "Just Cause 3"
},
{
"id": 325610,
"name": "Total War: ATTILA"
},
{
"id": 447040,
"name": "Watch_Dogs® 2"
},
{
"id": 306130,
"name": "The Elder Scrolls Online: Tamriel Unlimited"
},
{
"id": 391220,
"name": "Rise of the Tomb Raider"
},
{
"id": 285900,
"name": "Gang Beasts"
},
{
"id": 10500,
"name": "Empire: Total War"
}
]

12
steam/get_top_100_apps.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
URL="http://steamspy.com/api.php?request=top100in2weeks"
echo "Getting list of free apps..."
curl -s $URL | jq '[.[] | select(.price == "0") | {id: .appid, name}]' > $DIR/apps_free.json
echo "Getting list of paid apps..."
curl -s $URL | jq '[.[] | select(.price != "0") | {id: .appid, name}]' > $DIR/apps_paid.json