Let fdroidapk take '*' to update all packages in cwd.
This commit is contained in:
parent
9c297315fe
commit
40d4eb9595
1 changed files with 16 additions and 1 deletions
17
fdroidapk.py
17
fdroidapk.py
|
@ -73,6 +73,17 @@ def _retry_request(f, tries=5):
|
||||||
time.sleep(bo.next())
|
time.sleep(bo.next())
|
||||||
tries -= 1
|
tries -= 1
|
||||||
|
|
||||||
|
def ls_packages(path):
|
||||||
|
packages = set()
|
||||||
|
items = path.listdir()
|
||||||
|
for item in items:
|
||||||
|
if item.is_dir and '.' in item.basename:
|
||||||
|
packages.add(item.basename)
|
||||||
|
elif item.is_file and item.extension == 'apk':
|
||||||
|
package = item.basename.split('-')[0]
|
||||||
|
packages.add(package)
|
||||||
|
return sorted(packages)
|
||||||
|
|
||||||
@pipeable.ctrlc_return1
|
@pipeable.ctrlc_return1
|
||||||
def fpk_argparse(args):
|
def fpk_argparse(args):
|
||||||
destination = pathclass.Path(args.destination)
|
destination = pathclass.Path(args.destination)
|
||||||
|
@ -80,7 +91,11 @@ def fpk_argparse(args):
|
||||||
|
|
||||||
return_status = 0
|
return_status = 0
|
||||||
|
|
||||||
for package in args.packages:
|
packages = args.packages
|
||||||
|
if packages == ['*']:
|
||||||
|
packages = ls_packages(pathclass.cwd())
|
||||||
|
|
||||||
|
for package in packages:
|
||||||
package = normalize_package_name(package)
|
package = normalize_package_name(package)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue