def upload_scripts(client, script_dir, overwrite=True):
local_dir = os.path.join(genometools._root, '<STR_LIT:data>', '<STR_LIT>', '<STR_LIT>')<EOL>match = _BUCKET_PAT.match(script_dir)<EOL>script_bucket = match.group(<NUM_LIT:1>)<EOL>script_prefix = match.group(<NUM_LIT:2>)<EOL>depth = len(local_dir.split(os.sep))<EOL>for root, dirs, files in os.walk(local_dir):<EOL><INDENT>rel_path = '<STR_LIT:/>'.join(root.split(os.sep)[depth:])<EOL>for f in files:<EOL><INDENT>local_path = os.path.join(root, f)<EOL>if rel_path:<EOL><INDENT>remote_path = '<STR_LIT:/>'.join([script_prefix, rel_path, f])<EOL><DEDENT>else:<EOL><INDENT>remote_path = '<STR_LIT:/>'.join([script_prefix, f])<EOL><DEDENT>_LOGGER.info('<STR_LIT>', remote_path)<EOL>storage.upload_file(client, script_bucket, local_path, remote_path,<EOL>overwrite=overwrite)<EOL><DEDENT><DEDENT>
Uploads general-purpose scripts to a Google Storage bucket.

    TODO: docstring