Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make copy.py script runnable from command line #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions artmanflow/steps/copy_script.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import subprocess
"""
Run this script on the command-line by:
python copy_script.py <source_dir> <dest_dir>
"""
from subprocess import call
import sys

staging_path = '/usr/local/google/home/vam/_/_/101/art_2/java'
dest_path = '/usr/local/google/home/vam/_/projects/github/vam-google/google-cloud-java/google-cloud-clients'
#TODO change these values if necessary.
staging_path=sys.argv[1]
dest_path=sys.argv[2]

mapping = {
'gapic-google-cloud-bigquerydatatransfer-v1': 'google-cloud-bigquerydatatransfer',
Expand Down Expand Up @@ -29,6 +35,7 @@
'gapic-google-cloud-speech-v1beta1': 'google-cloud-speech',
'gapic-google-cloud-speech-v1p1beta1': 'google-cloud-speech',
'gapic-google-cloud-texttospeech-v1beta1': 'google-cloud-texttospeech',
'gapic-google-cloud-texttospeech-v1': 'google-cloud-texttospeech',
'gapic-google-cloud-trace-v1': 'google-cloud-trace',
'gapic-google-cloud-trace-v2': 'google-cloud-trace',
'gapic-google-cloud-video-intelligence-v1': 'google-cloud-video-intelligence',
Expand All @@ -44,4 +51,4 @@
for src_name, dest_name in mapping.items():
cmd = "cp -r %s/%s/src %s/%s" % (staging_path, src_name, dest_path, dest_name)
print(cmd)
subprocess.call(cmd.split())
subprocess.call(cmd.split())