Skip to content

Commit

Permalink
Merge pull request #64 from elock37/checkCache
Browse files Browse the repository at this point in the history
Add check for skin and patch in cache directory
  • Loading branch information
kotajacob authored Feb 7, 2018
2 parents 7af8aa3 + 8af6617 commit 0a32239
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions wal_steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,13 @@ def getColors(mode):
##########################

def checkSkin(steam_dir, dpi):
# check if the skin is in the skin folder
# check for skin and patch in cache
if not (os.path.isdir(METRO_COPY) and os.path.isdir(METRO_PATCH_COPY)):
# metro skin and patch not found in cache, download and make
makeSkin()
# check for patched skin in steam skin directory
if not os.path.isdir(os.path.join(steam_dir, SKIN_NAME)):
# skin was not found, copy it over
# patched skin not found in steam, copy it over
print("Installing skin")
copy_tree(METRO_COPY, os.path.join(steam_dir, SKIN_NAME))
else:
Expand All @@ -255,7 +259,7 @@ def makeSkin():
z.close()

# download metro for steam patch and extract
print("Downloading Metro patch")
print("Downloading Metro patch")
try:
urllib.request.urlretrieve(METRO_PATCH_URL, METRO_PATCH_ZIP)
except:
Expand Down

0 comments on commit 0a32239

Please sign in to comment.