mirror of
https://github.com/BioArchLinux/bioarchlinux-tools.git
synced 2025-03-09 22:53:31 +00:00
add bumpkgrel
This commit is contained in:
parent
0fd644793c
commit
923ba04cc3
2 changed files with 35 additions and 1 deletions
33
updater/bumpkgrel.py
Executable file
33
updater/bumpkgrel.py
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/python
|
||||
from lilac2.api import update_pkgrel
|
||||
import argparse
|
||||
import os
|
||||
|
||||
|
||||
def main(file, path):
|
||||
current_dir = os.getcwd()
|
||||
with open(file, "r") as f:
|
||||
for pkgname in f.readlines():
|
||||
pkgname = pkgname.strip()
|
||||
if not pkgname.startswith("r-"):
|
||||
pkgname = "r-" + pkgname.lower()
|
||||
os.chdir(f"{path}/{pkgname}")
|
||||
update_pkgrel()
|
||||
os.chdir(current_dir)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(
|
||||
description='update pkgrel for a list of R packages',
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter
|
||||
)
|
||||
parser.add_argument(
|
||||
'-f', '--file', help='file contains pkgname, one per line, CRAN name style or aur name style are both ok')
|
||||
parser.add_argument('-b', '--bioarch-path',
|
||||
help='path to BioArchLinux', default='BioArchLinux')
|
||||
args = parser.parse_args()
|
||||
if not args.file:
|
||||
parser.print_help()
|
||||
exit(1)
|
||||
|
||||
main(args.file, args.bioarch_path)
|
|
@ -10,4 +10,5 @@ For usage, run with argument `-h`.
|
|||
- [ ] Support packages hosted in github.
|
||||
- [ ] Clean codes
|
||||
- [ ] merger `pkg_archiver` into `depends_updater`
|
||||
- [ ] merge `sync_meta_data` into `dbmanager`
|
||||
- [ ] generate PKGBUILD for missing dependencies `depends_updater`
|
||||
- [x] merge `sync_meta_data` into `dbmanager`
|
||||
|
|
Loading…
Add table
Reference in a new issue