mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Added directory prefix option
This commit is contained in:
parent
54ed0fe76a
commit
cecc59430a
6 changed files with 20 additions and 2 deletions
|
@ -443,7 +443,7 @@ Command Line Tool Usage
|
|||
--checklist dependencies.
|
||||
-s, --sync, [repository] [package...], Sync packages. Install packages
|
||||
--resolve-off, --download-only, directly from remote repositories
|
||||
--case-ins with all dependencies.
|
||||
--directory-prefix=[dir], --case-ins with all dependencies.
|
||||
-t, --tracking, [repository] [package], Tracking package dependencies and
|
||||
--check-deps, --graph=[type], print package dependencies tree with
|
||||
--case-ins highlight if packages is installed.
|
||||
|
|
|
@ -41,6 +41,7 @@ Usage: slpkg Commands:
|
|||
[-s [repository] [package...], --resolve-off, --download-only,
|
||||
--case-ins]
|
||||
[-t [repository] [package], --check-deps, --graph=[type],
|
||||
--directory-prefix=[dir],
|
||||
--case-ins]
|
||||
[-p [repository] [package], --color=[]]
|
||||
[-n [SBo package], --checklist, --case-ins]
|
||||
|
@ -222,6 +223,8 @@ Additional options:
|
|||
.PP
|
||||
\fB--download-only\fP : Download packages without install.
|
||||
.PP
|
||||
\fB--directory-prefix=[path/to/dir/]\fP : Download packages in specific directory.
|
||||
.PP
|
||||
\fB--case-ins\fP : Search package name in repository with case insensitive.
|
||||
|
||||
.SS -t, --tracking, tracking dependencies
|
||||
|
|
|
@ -93,7 +93,7 @@ Optional arguments:
|
|||
--checklist dependencies.
|
||||
-s, --sync, [repository] [package...], Sync packages. Install packages
|
||||
--resolve-off, --download-only, directly from remote repositories
|
||||
--case-ins with all dependencies.
|
||||
--directory-prefix=[dir], --case-ins with all dependencies.
|
||||
-t, --tracking, [repository] [package], Tracking package dependencies and
|
||||
--check-deps, --graph=[type], print package dependencies tree with
|
||||
--case-ins highlight if packages is installed.
|
||||
|
@ -160,6 +160,7 @@ def usage(repo):
|
|||
[-c [repository], --upgrade, --skip=[...], --resolve-off,
|
||||
--checklist]
|
||||
[-s [repository] [package...], --resolve-off, --download-only,
|
||||
--directory-prefix=[dir],
|
||||
--case-ins]
|
||||
[-t [repository] [package], --check-deps, --graph=[type],
|
||||
--case-ins]
|
||||
|
|
|
@ -58,6 +58,11 @@ class BinaryInstall(object):
|
|||
self.msg = Msg()
|
||||
self.version = self.meta.slack_rel
|
||||
self.tmp_path = self.meta.slpkg_tmp_packages
|
||||
for fl in self.flag:
|
||||
if fl.startswith("--directory-prefix="):
|
||||
self.tmp_path = fl.split("=")[1]
|
||||
if not self.tmp_path.endswith("/"):
|
||||
self.tmp_path += "/"
|
||||
self.dwn, self.dep_dwn = [], []
|
||||
self.install, self.dep_install = [], []
|
||||
self.comp_sum, self.dep_comp_sum = [], []
|
||||
|
|
|
@ -327,9 +327,13 @@ class ArgParse(object):
|
|||
additional_options = [
|
||||
"--resolve-off",
|
||||
"--download-only",
|
||||
"--directory-prefix=",
|
||||
"--case-ins"
|
||||
]
|
||||
for arg in self.args:
|
||||
if arg.startswith(additional_options[2]):
|
||||
flag.append(arg)
|
||||
arg = ""
|
||||
if arg in additional_options:
|
||||
flag.append(arg)
|
||||
if len(self.args) >= 3 and self.args[0] in options:
|
||||
|
|
|
@ -56,6 +56,11 @@ class SBoInstall(object):
|
|||
self.msg = Msg()
|
||||
self.arch = SBoArch().get()
|
||||
self.build_folder = self.meta.build_path
|
||||
for fl in self.flag:
|
||||
if fl.startswith("--directory-prefix="):
|
||||
self.build_folder = fl.split("=")[1]
|
||||
if not self.build_folder.endswith("/"):
|
||||
self.build_folder += "/"
|
||||
self.unst = ["UNSUPPORTED", "UNTESTED"]
|
||||
self.master_packages = []
|
||||
self.deps = []
|
||||
|
|
Loading…
Reference in a new issue