-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,23 +29,24 @@ def cmd_init(args): | |
|
||
else: | ||
print('~/idapm.json already exists...') | ||
input_pattern = {'y': True, 'yes': True, 'n': False, 'no': False} | ||
while True: | ||
input_pattern = {'y': True, 'yes': True, 'n': False, 'no': False} | ||
try: | ||
key = input('Do you want to install a plugin written in ~/idapm.json? [Y/n]: ').lower() | ||
if input_pattern[key]: | ||
plugin_repos = c.list_plugins() | ||
for plugin in plugin_repos: | ||
print('----------------------') | ||
try: | ||
repo_url = 'https://github.com/{0}.git'.format(repo_name) | ||
repo_url = 'https://github.com/{0}.git'.format(plugin) | ||
print('Try: git clone {0}'.format(repo_url)) | ||
installer.install_from_github(plugin, repo_url) | ||
|
||
except: | ||
repo_url = '[email protected]:{0}.git'.format(repo_name) | ||
repo_url = '[email protected]:{0}.git'.format(plugin) | ||
print('Try: git clone {0}'.format(repo_url)) | ||
installer.install_from_github(plugin, repo_url) | ||
|
||
break | ||
|
||
except: | ||
|
@@ -60,9 +61,16 @@ def cmd_install(args): | |
if c.check_duplicate(args.plugin_name): | ||
print(Fore.RED + '{0} already exists in config'.format(args.plugin_name)) | ||
input_pattern = {'y': True, 'yes': True, 'n': False, 'no': False} | ||
key = input('Do you want to reinstall {0}? [Y/n]: '.format(args.plugin_name)).lower() | ||
if not input_pattern[key]: | ||
return | ||
while True: | ||
try: | ||
key = input('Do you want to reinstall {0}? [Y/n]: '.format(args.plugin_name)).lower() | ||
if not input_pattern[key]: | ||
return | ||
else: | ||
break | ||
|
||
except: | ||
pass | ||
|
||
print('----------------------') | ||
repo_https_url = 'https://github.com/{0}.git'.format(args.plugin_name) | ||
|