# Garth N. Wells, 2013
#
# Modified by Johannes Ring, 2013 (Add .inp files)
#
# This script creates a .zsync file for all .gz and .inp files
# in the current directory

import os    
from subprocess import call

# URL root path fo files
url_path = "http://fenicsproject.org/pub/data/meshes/" 

files_in_dir = os.listdir("./")
for file in files_in_dir:
    if file[-2:] == "gz" or file[-3:] == "inp":
        path = url_path + file
        call(["zsyncmake", "-Z", "-u", path, file])
