import textwrap
    print textwrap.dedent("""
      Script Arguments (* is optional)
            argv[0]   "python %s"
            argv[1]   inputDir       (from Step2)
            argv[2]*  isDryRun       (default ~ 0)
            argv[3]*  useTestParams  (default ~ 0)
      """) % argv[0]
    exit(1)

# Parse CLI args
inDir = checkExists(argv[1])
isDryRun = (len(argv) > 2 and not argv[2] == '0')
testParams = (len(argv) > 3 and not argv[3] == '0')

masterPkgList = getMasterPackageList()
RELEASE = getReleaseParams(testParams)

signAddress = RELEASE['SignAddr']
announceName = RELEASE['AnnounceFile']
bucketPrefix = RELEASE['BucketPrefix']
htmlRelease = bucketPrefix + RELEASE['BucketReleases']
htmlAnnounce = bucketPrefix + RELEASE['BucketAnnounce']
s3Release = 's3://%s' % RELEASE['BucketReleases']
s3Announce = 's3://%s' % RELEASE['BucketAnnounce']
gpgKeyID = RELEASE['GPGKeyID']
btcWltID = RELEASE['BTCWltID']

#uploadlog = open('step3_log_%d.txt' % long(time.time()), 'w')
uploadlog = open('step3_log.txt', 'w')
         argv[5]*  git branch to tag (default ~ "master")
         argv[6]*  use testing settings (default ~ "0")
            """) % argv[0]
   exit(1)

# Process CLI args
inDir      = checkExists(argv[1])
outDir     = argv[2]
bundleDir  = argv[3]
isTestRelease = (len(argv)>4 and not argv[4]=="0")
gitBranch  = 'master' if len(argv)<5 else argv[5]
testParams = (len(argv)>6 and not argv[6]=="0")
outDir = makeOutputDir(outDir, wipe=False)


masterPkgList = getMasterPackageList()
RELEASE = getReleaseParams(testParams)


# Other defaults -- same for all Armory releases
builder        = RELEASE['Builder']
gituser        = RELEASE['GitUser']
gitemail       = RELEASE['GitEmail']
signAddress    = RELEASE['SignAddr']
announceName   = RELEASE['AnnounceFile']
bucketPrefix   = RELEASE['BucketPrefix']
bucketAnnounce = bucketPrefix + RELEASE['BucketAnnounce']
bucketReleases = bucketPrefix + RELEASE['BucketReleases']
gpgKeyID       = RELEASE['GPGKeyID']
btcWltID       = RELEASE['BTCWltID']