mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
Remove unnecessary chdir, and avoid the need to create the dir when
there is no need to parse PKGBUILD
This commit is contained in:
parent
aaf375f0bd
commit
c90e8fc07b
1 changed files with 1 additions and 2 deletions
|
@ -25,7 +25,7 @@ get_vcs() {
|
||||||
local _vcs=$1
|
local _vcs=$1
|
||||||
local _out_var=$2
|
local _out_var=$2
|
||||||
if [[ -z $_vcs ]]; then
|
if [[ -z $_vcs ]]; then
|
||||||
_vcs=$(. PKGBUILD &> /dev/null
|
_vcs=$(. "${dir}"/PKGBUILD &> /dev/null
|
||||||
for src in "${source[@]}"; do
|
for src in "${source[@]}"; do
|
||||||
parse_vcs_url "$src" _ && {
|
parse_vcs_url "$src" _ && {
|
||||||
echo "$src"
|
echo "$src"
|
||||||
|
@ -107,7 +107,6 @@ git_get_tags() {
|
||||||
git ls-remote "$_url" | grep -oP '(?<=refs/tags/)[^^]*$'
|
git ls-remote "$_url" | grep -oP '(?<=refs/tags/)[^^]*$'
|
||||||
}
|
}
|
||||||
|
|
||||||
cd "${dir}"
|
|
||||||
get_vcs "${vcs}" components || exit 1
|
get_vcs "${vcs}" components || exit 1
|
||||||
if [[ "x$get_tags" == "xget_tags" ]]; then
|
if [[ "x$get_tags" == "xget_tags" ]]; then
|
||||||
eval "${components[0]}_get_tags"' ${components[@]:1}' >&3
|
eval "${components[0]}_get_tags"' ${components[@]:1}' >&3
|
||||||
|
|
Loading…
Add table
Reference in a new issue