This commit is contained in:
Jay Lee
2020-03-05 10:08:25 -05:00
7 changed files with 124 additions and 59 deletions

61
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- enhancement
- help wanted
- security
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: wontfix
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# issues:
# exemptLabels:
# - confirmed

View File

@@ -4,7 +4,7 @@ language: python
env: env:
global: global:
- BUILD_PYTHON_VERSION=3.8.2 - BUILD_PYTHON_VERSION=3.8.1
- BUILD_OPENSSL_VERSION=1.1.1d - BUILD_OPENSSL_VERSION=1.1.1d
- PATCHELF_VERSION=0.9 - PATCHELF_VERSION=0.9
- PYINSTALLER_VERSION=3.5 - PYINSTALLER_VERSION=3.5

View File

@@ -1004,6 +1004,7 @@ The following attributes are equivalent:
(end (allday <Date>)|<Time>)| (end (allday <Date>)|<Time>)|
guestscantinviteothers| guestscantinviteothers|
guestscantseeothers| guestscantseeothers|
hangoutsmeet|
(id <String>)| (id <String>)|
(location <String>)| (location <String>)|
(noreminders| (reminder <Number> email|popup|sms))| (noreminders| (reminder <Number> email|popup|sms))|

View File

@@ -13,3 +13,26 @@ def print_error(message):
def print_warning(message): def print_warning(message):
"""Prints a one-line warning message to stderr in a standard format.""" """Prints a one-line warning message to stderr in a standard format."""
sys.stderr.write('\n{0}{1}\n'.format(WARNING_PREFIX, message)) sys.stderr.write('\n{0}{1}\n'.format(WARNING_PREFIX, message))
def print_json(object_value, spacing=''):
"""Prints Dict or Array to screen in clean human-readable format.."""
if isinstance(object_value, list):
if len(object_value) == 1 and isinstance(object_value[0], (str, int, bool)):
sys.stdout.write(f'{object_value[0]}\n')
return
if spacing:
sys.stdout.write('\n')
for i, a_value in enumerate(object_value):
if isinstance(a_value, (str, int, bool)):
sys.stdout.write(f' {spacing}{i+1}) {a_value}\n')
else:
sys.stdout.write(f' {spacing}{i+1}) ')
print_json(a_value, f' {spacing}')
elif isinstance(object_value, dict):
for key in ['kind', 'etag', 'etags']:
object_value.pop(key, None)
for another_object, another_value in object_value.items():
sys.stdout.write(f' {spacing}{another_object}: ')
print_json(another_value, f' {spacing}')
else:
sys.stdout.write(f'{object_value}\n')

View File

@@ -1203,8 +1203,8 @@ def doCheckServiceAccount(users):
# Tack on email scope for more accurate checking # Tack on email scope for more accurate checking
check_scopes.append(USERINFO_EMAIL_SCOPE) check_scopes.append(USERINFO_EMAIL_SCOPE)
long_url = (f'https://admin.google.com/{user_domain}/ManageOauthClients' long_url = (f'https://admin.google.com/{user_domain}/ManageOauthClients'
f'?clientScopeToAdd={",".join(check_scopes)}' f'?clientScopeToAdd={",".join(check_scopes)}'
f'&clientNameToAdd={service_account}') f'&clientNameToAdd={service_account}')
short_url = shorten_url(long_url) short_url = shorten_url(long_url)
scopes_failed = f'''Some scopes failed! To authorize them, please go to: scopes_failed = f'''Some scopes failed! To authorize them, please go to:
@@ -1785,7 +1785,7 @@ def doGetDomainInfo():
for i in range(0, len(result['domainAliases'])): for i in range(0, len(result['domainAliases'])):
if 'creationTime' in result['domainAliases'][i]: if 'creationTime' in result['domainAliases'][i]:
result['domainAliases'][i]['creationTime'] = utils.formatTimestampYMDHMSF(result['domainAliases'][i]['creationTime']) result['domainAliases'][i]['creationTime'] = utils.formatTimestampYMDHMSF(result['domainAliases'][i]['creationTime'])
print_json(None, result) display.print_json(result)
def doGetDomainAliasInfo(): def doGetDomainAliasInfo():
cd = buildGAPIObject('directory') cd = buildGAPIObject('directory')
@@ -1793,7 +1793,7 @@ def doGetDomainAliasInfo():
result = gapi.call(cd.domainAliases(), 'get', customer=GC_Values[GC_CUSTOMER_ID], domainAliasName=alias) result = gapi.call(cd.domainAliases(), 'get', customer=GC_Values[GC_CUSTOMER_ID], domainAliasName=alias)
if 'creationTime' in result: if 'creationTime' in result:
result['creationTime'] = utils.formatTimestampYMDHMSF(result['creationTime']) result['creationTime'] = utils.formatTimestampYMDHMSF(result['creationTime'])
print_json(None, result) display.print_json(result)
def doGetCustomerInfo(): def doGetCustomerInfo():
cd = buildGAPIObject('directory') cd = buildGAPIObject('directory')
@@ -2182,9 +2182,7 @@ def doCreateDataTransfer():
def doPrintTransferApps(): def doPrintTransferApps():
dt = buildGAPIObject('datatransfer') dt = buildGAPIObject('datatransfer')
apps = gapi.get_all_pages(dt.applications(), 'list', 'applications', customerId=GC_Values[GC_CUSTOMER_ID]) apps = gapi.get_all_pages(dt.applications(), 'list', 'applications', customerId=GC_Values[GC_CUSTOMER_ID])
for app in apps: display.print_json(apps)
print_json(None, app)
print()
def doPrintDataTransfers(): def doPrintDataTransfers():
dt = buildGAPIObject('datatransfer') dt = buildGAPIObject('datatransfer')
@@ -2308,7 +2306,7 @@ def doPrintShowGuardians(csvFormat):
if not csvFormat: if not csvFormat:
print(f'Student: {studentId}, {itemName}:{currentCount(i, count)}') print(f'Student: {studentId}, {itemName}:{currentCount(i, count)}')
for guardian in guardians: for guardian in guardians:
print_json(None, guardian, spacing=' ') display.print_json(guardian, spacing=' ')
else: else:
for guardian in guardians: for guardian in guardians:
guardian['studentEmail'] = studentId guardian['studentEmail'] = studentId
@@ -2435,7 +2433,7 @@ def doGetCourseInfo():
courseId = addCourseIdScope(sys.argv[3]) courseId = addCourseIdScope(sys.argv[3])
info = gapi.call(croom.courses(), 'get', id=courseId) info = gapi.call(croom.courses(), 'get', id=courseId)
info['ownerEmail'] = convertUIDtoEmailAddress(f'uid:{info["ownerId"]}') info['ownerEmail'] = convertUIDtoEmailAddress(f'uid:{info["ownerId"]}')
print_json(None, info) display.print_json(info)
teachers = gapi.get_all_pages(croom.courses().teachers(), 'list', 'teachers', courseId=courseId) teachers = gapi.get_all_pages(croom.courses().teachers(), 'list', 'teachers', courseId=courseId)
students = gapi.get_all_pages(croom.courses().students(), 'list', 'students', courseId=courseId) students = gapi.get_all_pages(croom.courses().students(), 'list', 'students', courseId=courseId)
try: try:
@@ -3041,7 +3039,7 @@ def doPrinterShowACL():
for acl in printer_info['printers'][0]['access']: for acl in printer_info['printers'][0]['access']:
if 'key' in acl: if 'key' in acl:
acl['accessURL'] = f'https://www.google.com/cloudprint/addpublicprinter.html?printerid={show_printer}&key={acl["key"]}' acl['accessURL'] = f'https://www.google.com/cloudprint/addpublicprinter.html?printerid={show_printer}&key={acl["key"]}'
print_json(None, acl) display.print_json(acl)
print() print()
def doPrinterAddACL(): def doPrinterAddACL():
@@ -3278,7 +3276,7 @@ def doGetPrinterInfo():
if not everything: if not everything:
del printer_info['capabilities'] del printer_info['capabilities']
del printer_info['access'] del printer_info['access']
print_json(None, printer_info) display.print_json(printer_info)
def doUpdatePrinter(): def doUpdatePrinter():
cp = buildGAPIObject('cloudprint') cp = buildGAPIObject('cloudprint')
@@ -3726,6 +3724,9 @@ def doCalendarAddEvent():
elif myarg == 'colorindex': elif myarg == 'colorindex':
body['colorId'] = getInteger(sys.argv[i+1], myarg, CALENDAR_EVENT_MIN_COLOR_INDEX, CALENDAR_EVENT_MAX_COLOR_INDEX) body['colorId'] = getInteger(sys.argv[i+1], myarg, CALENDAR_EVENT_MIN_COLOR_INDEX, CALENDAR_EVENT_MAX_COLOR_INDEX)
i += 2 i += 2
elif myarg == 'hangoutsmeet':
body['conferenceData'] = {'createRequest': {'requestId': f'{str(uuid.uuid4())}'}}
i += 1
else: else:
controlflow.invalid_argument_exit(sys.argv[i], "gam calendar <email> addevent") controlflow.invalid_argument_exit(sys.argv[i], "gam calendar <email> addevent")
if ('recurrence' in body) and (('start' in body) or ('end' in body)): if ('recurrence' in body) and (('start' in body) or ('end' in body)):
@@ -4948,7 +4949,7 @@ def showDriveFileInfo(users):
continue continue
feed = gapi.call(drive.files(), 'get', fileId=fileId, fields=fields, supportsAllDrives=True) feed = gapi.call(drive.files(), 'get', fileId=fileId, fields=fields, supportsAllDrives=True)
if feed: if feed:
print_json(None, feed) display.print_json(feed)
def showDriveFileRevisions(users): def showDriveFileRevisions(users):
fileId = sys.argv[5] fileId = sys.argv[5]
@@ -4958,7 +4959,7 @@ def showDriveFileRevisions(users):
continue continue
feed = gapi.call(drive.revisions(), 'list', fileId=fileId) feed = gapi.call(drive.revisions(), 'list', fileId=fileId)
if feed: if feed:
print_json(None, feed) display.print_json(feed)
def transferSecCals(users): def transferSecCals(users):
target_user = sys.argv[5] target_user = sys.argv[5]
@@ -5595,7 +5596,7 @@ def printShowSmime(users, csvFormat):
for smime in smimes: for smime in smimes:
addRowTitlesToCSVfile(flatten_json(smime, flattened={'User': user}), csvRows, titles) addRowTitlesToCSVfile(flatten_json(smime, flattened={'User': user}), csvRows, titles)
else: else:
print_json(None, smimes) display.print_json(smimes)
if csvFormat: if csvFormat:
writeCSVfile(csvRows, titles, 'S/MIME', todrive) writeCSVfile(csvRows, titles, 'S/MIME', todrive)
@@ -7368,14 +7369,14 @@ def shorten_url(long_url):
'User-Agent': GAM_INFO} 'User-Agent': GAM_INFO}
try: try:
resp, content = simplehttp.request(url_shortnr, 'POST', resp, content = simplehttp.request(url_shortnr, 'POST',
f'{{"long_url": "{long_url}"}}', headers=headers) f'{{"long_url": "{long_url}"}}', headers=headers)
except Exception as e: except Exception:
return long_url return long_url
if resp.status != 200: if resp.status != 200:
return long_url return long_url
try: try:
return json.loads(content).get('short_url', long_url) return json.loads(content).get('short_url', long_url)
except Exception as e: except Exception:
print(content) print(content)
return long_url return long_url
@@ -7948,7 +7949,7 @@ def doShowServiceAccountKeys():
key['name'] = key['name'].rsplit('/', 1)[-1] key['name'] = key['name'].rsplit('/', 1)[-1]
if key['name'] == currentPrivateKeyId: if key['name'] == currentPrivateKeyId:
key['usedToAuthenticateThisRequest'] = True key['usedToAuthenticateThisRequest'] = True
print_json(None, keys) display.print_json(keys)
def doCreateOrRotateServiceAccountKeys(iam=None, project_id=None, client_email=None, client_id=None): def doCreateOrRotateServiceAccountKeys(iam=None, project_id=None, client_email=None, client_id=None):
local_key_size = 2048 local_key_size = 2048
@@ -8113,7 +8114,7 @@ def doGetTeamDriveInfo(users):
continue continue
result = gapi.call(drive.drives(), 'get', driveId=teamDriveId, result = gapi.call(drive.drives(), 'get', driveId=teamDriveId,
useDomainAdminAccess=useDomainAdminAccess, fields='*') useDomainAdminAccess=useDomainAdminAccess, fields='*')
print_json(None, result) display.print_json(result)
def doCreateTeamDrive(users): def doCreateTeamDrive(users):
body = {'name': sys.argv[5]} body = {'name': sys.argv[5]}
@@ -8405,7 +8406,7 @@ def doCreateVaultExport():
body['exportOptions'][options_field]['showConfidentialModeContent'] = showConfidentialModeContent body['exportOptions'][options_field]['showConfidentialModeContent'] = showConfidentialModeContent
results = gapi.call(v.matters().exports(), 'create', matterId=matterId, body=body) results = gapi.call(v.matters().exports(), 'create', matterId=matterId, body=body)
print(f'Created export {results["id"]}') print(f'Created export {results["id"]}')
print_json(None, results) display.print_json(results)
def doDeleteVaultExport(): def doDeleteVaultExport():
v = buildGAPIObject('vault') v = buildGAPIObject('vault')
@@ -8419,7 +8420,7 @@ def doGetVaultExportInfo():
matterId = getMatterItem(v, sys.argv[3]) matterId = getMatterItem(v, sys.argv[3])
exportId = convertExportNameToID(v, sys.argv[4], matterId) exportId = convertExportNameToID(v, sys.argv[4], matterId)
export = gapi.call(v.matters().exports(), 'get', matterId=matterId, exportId=exportId) export = gapi.call(v.matters().exports(), 'get', matterId=matterId, exportId=exportId)
print_json(None, export) display.print_json(export)
def _getCloudStorageObject(s, bucket, object_, local_file=None, expectedMd5=None): def _getCloudStorageObject(s, bucket, object_, local_file=None, expectedMd5=None):
if not local_file: if not local_file:
@@ -8665,7 +8666,7 @@ def doGetVaultHoldInfo():
results['accounts'][i]['email'] = acct_email results['accounts'][i]['email'] = acct_email
if 'orgUnit' in results: if 'orgUnit' in results:
results['orgUnit']['orgUnitPath'] = doGetOrgInfo(results['orgUnit']['orgUnitId'], return_attrib='orgUnitPath') results['orgUnit']['orgUnitPath'] = doGetOrgInfo(results['orgUnit']['orgUnitId'], return_attrib='orgUnitPath')
print_json(None, results) display.print_json(results)
def convertExportNameToID(v, nameOrID, matterId): def convertExportNameToID(v, nameOrID, matterId):
nameOrID = nameOrID.lower() nameOrID = nameOrID.lower()
@@ -8844,7 +8845,7 @@ def doGetVaultMatterInfo():
uid = f'uid:{result["matterPermissions"][i]["accountId"]}' uid = f'uid:{result["matterPermissions"][i]["accountId"]}'
user_email = convertUIDtoEmailAddress(uid, cd) user_email = convertUIDtoEmailAddress(uid, cd)
result['matterPermissions'][i]['email'] = user_email result['matterPermissions'][i]['email'] = user_email
print_json(None, result) display.print_json(result)
def doCreateUser(): def doCreateUser():
cd = buildGAPIObject('directory') cd = buildGAPIObject('directory')
@@ -9119,7 +9120,7 @@ def doGetBuildingInfo():
building['floorNames'] = ','.join(building['floorNames']) building['floorNames'] = ','.join(building['floorNames'])
if 'buildingName' in building: if 'buildingName' in building:
sys.stdout.write(building.pop('buildingName')) sys.stdout.write(building.pop('buildingName'))
print_json(None, building) display.print_json(building)
def doDeleteBuilding(): def doDeleteBuilding():
cd = buildGAPIObject('directory') cd = buildGAPIObject('directory')
@@ -9826,7 +9827,7 @@ def doCreateResoldSubscription():
customerAuthToken, body = _getResoldSubscriptionAttr(sys.argv[4:], customerId) customerAuthToken, body = _getResoldSubscriptionAttr(sys.argv[4:], customerId)
result = gapi.call(res.subscriptions(), 'insert', customerId=customerId, customerAuthToken=customerAuthToken, body=body, fields='customerId') result = gapi.call(res.subscriptions(), 'insert', customerId=customerId, customerAuthToken=customerAuthToken, body=body, fields='customerId')
print('Created subscription:') print('Created subscription:')
print_json(None, result) display.print_json(result)
def doUpdateResoldSubscription(): def doUpdateResoldSubscription():
res = buildGAPIObject('reseller') res = buildGAPIObject('reseller')
@@ -9885,7 +9886,7 @@ def doUpdateResoldSubscription():
result = gapi.call(res.subscriptions(), function, customerId=customerId, subscriptionId=subscriptionId, **kwargs) result = gapi.call(res.subscriptions(), function, customerId=customerId, subscriptionId=subscriptionId, **kwargs)
print(f'Updated {customerId} SKU {sku} subscription:') print(f'Updated {customerId} SKU {sku} subscription:')
if result: if result:
print_json(None, result) display.print_json(result)
def doGetResoldSubscriptions(): def doGetResoldSubscriptions():
res = buildGAPIObject('reseller') res = buildGAPIObject('reseller')
@@ -9900,7 +9901,7 @@ def doGetResoldSubscriptions():
else: else:
controlflow.invalid_argument_exit(myarg, "gam info resoldsubscriptions") controlflow.invalid_argument_exit(myarg, "gam info resoldsubscriptions")
result = gapi.call(res.subscriptions(), 'list', customerId=customerId, customerAuthToken=customerAuthToken) result = gapi.call(res.subscriptions(), 'list', customerId=customerId, customerAuthToken=customerAuthToken)
print_json(None, result) display.print_json(result)
def _getResoldSubscriptionAttr(arg, customerId): def _getResoldSubscriptionAttr(arg, customerId):
body = {'plan': {}, body = {'plan': {},
@@ -9934,7 +9935,7 @@ def doGetResoldCustomer():
res = buildGAPIObject('reseller') res = buildGAPIObject('reseller')
customerId = sys.argv[3] customerId = sys.argv[3]
result = gapi.call(res.customers(), 'get', customerId=customerId) result = gapi.call(res.customers(), 'get', customerId=customerId)
print_json(None, result) display.print_json(result)
def _getResoldCustomerAttr(arg): def _getResoldCustomerAttr(arg):
body = {} body = {}
@@ -9982,7 +9983,7 @@ def doGetMemberInfo():
memberKey = normalizeEmailAddressOrUID(sys.argv[3]) memberKey = normalizeEmailAddressOrUID(sys.argv[3])
groupKey = normalizeEmailAddressOrUID(sys.argv[4]) groupKey = normalizeEmailAddressOrUID(sys.argv[4])
info = gapi.call(cd.members(), 'get', memberKey=memberKey, groupKey=groupKey) info = gapi.call(cd.members(), 'get', memberKey=memberKey, groupKey=groupKey)
print_json(None, info) display.print_json(info)
def doGetUserInfo(user_email=None): def doGetUserInfo(user_email=None):
@@ -10362,7 +10363,7 @@ def doGetResourceCalendarInfo():
if 'buildingId' in resource: if 'buildingId' in resource:
resource['buildingName'] = _getBuildingNameById(cd, resource['buildingId']) resource['buildingName'] = _getBuildingNameById(cd, resource['buildingId'])
resource['buildingId'] = f'id:{resource["buildingId"]}' resource['buildingId'] = f'id:{resource["buildingId"]}'
print_json(None, resource) display.print_json(resource)
def _filterTimeRanges(activeTimeRanges, startDate, endDate): def _filterTimeRanges(activeTimeRanges, startDate, endDate):
if startDate is None and endDate is None: if startDate is None and endDate is None:
@@ -10479,7 +10480,7 @@ def doGetCrosInfo():
print(f' {up}: {cros[up]}') print(f' {up}: {cros[up]}')
else: else:
sys.stdout.write(f' {up}:') sys.stdout.write(f' {up}:')
print_json(None, cros[up], ' ') display.print_json(cros[up], ' ')
if not noLists: if not noLists:
activeTimeRanges = _filterTimeRanges(cros.get('activeTimeRanges', []), startDate, endDate) activeTimeRanges = _filterTimeRanges(cros.get('activeTimeRanges', []), startDate, endDate)
lenATR = len(activeTimeRanges) lenATR = len(activeTimeRanges)
@@ -10561,32 +10562,7 @@ def doGetMobileInfo():
attrib = 'securityPatchLevel' attrib = 'securityPatchLevel'
if attrib in info and int(info[attrib]): if attrib in info and int(info[attrib]):
info[attrib] = utils.formatTimestampYMDHMS(info[attrib]) info[attrib] = utils.formatTimestampYMDHMS(info[attrib])
print_json(None, info) display.print_json(info)
def print_json(object_name, object_value, spacing=''):
if object_name in ['kind', 'etag', 'etags']:
return
if object_name is not None:
sys.stdout.write(f'{spacing}{object_name}: ')
if isinstance(object_value, list):
if len(object_value) == 1 and isinstance(object_value[0], (str, int, bool)):
sys.stdout.write(f'{object_value[0]}\n')
return
if object_name is not None:
sys.stdout.write('\n')
for a_value in object_value:
if isinstance(a_value, (str, int, bool)):
sys.stdout.write(f' {spacing}{a_value}\n')
else:
print_json(None, a_value, f' {spacing}')
elif isinstance(object_value, dict):
print()
if object_name is not None:
sys.stdout.write('\n')
for another_object in object_value:
print_json(another_object, object_value[another_object], f' {spacing}')
else:
sys.stdout.write(f'{object_value}\n')
def doSiteVerifyShow(): def doSiteVerifyShow():
verif = buildGAPIObject('siteVerification') verif = buildGAPIObject('siteVerification')
@@ -10814,7 +10790,7 @@ def doGetOrgInfo(name=None, return_attrib=None):
result = gapi.call(cd.orgunits(), 'get', customerId=GC_Values[GC_CUSTOMER_ID], orgUnitPath=encodeOrgUnitPath(name)) result = gapi.call(cd.orgunits(), 'get', customerId=GC_Values[GC_CUSTOMER_ID], orgUnitPath=encodeOrgUnitPath(name))
if return_attrib: if return_attrib:
return result[return_attrib] return result[return_attrib]
print_json(None, result) display.print_json(result)
if get_users: if get_users:
name = result['orgUnitPath'] name = result['orgUnitPath']
page_message = gapi.got_total_items_first_last_msg('Users') page_message = gapi.got_total_items_first_last_msg('Users')

View File

@@ -11,6 +11,8 @@ export PATH=$PATH:/c/python/scripts
cd $mypath cd $mypath
export python=/c/python/python.exe export python=/c/python/python.exe
export pip=/c/python/scripts/pip.exe export pip=/c/python/scripts/pip.exe
until [ -f $python ]; do :; done
until [ -f $pip ]; do :; done
$pip install --upgrade pip $pip install --upgrade pip
$pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U $pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U

View File

@@ -21,6 +21,8 @@ export PATH=$PATH:/c/python/scripts
cd $mypath cd $mypath
export python=/c/python/python.exe export python=/c/python/python.exe
export pip=/c/python/scripts/pip.exe export pip=/c/python/scripts/pip.exe
until [ -f $python ]; do :; done
until [ -f $pip ]; do :; done
$pip install --upgrade pip $pip install --upgrade pip
$pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U $pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U