Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pmodules
src
Commits
7d87a911
Commit
7d87a911
authored
Oct 11, 2016
by
Achim Gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pmodules/libpbuild.bash
- find_tarball() must be top-level scope (not a nested function)
parent
8e36c8ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
43 deletions
+44
-43
Pmodules/libpbuild.bash
Pmodules/libpbuild.bash
+44
-43
No files found.
Pmodules/libpbuild.bash
View file @
7d87a911
...
...
@@ -177,54 +177,55 @@ pbuild::module_is_available() {
[[
-n
$(
"
${
MODULECMD
}
"
bash avail
"
$1
"
2>&1 1>/dev/null
)
]]
}
#......................................................................
#
# Find tarball for given module.
# Sets global variable TARBALL if found or exit with error message.
#
# Arguments:
# $1: name
# $2: version
# $3...: download directories
#
# Used global variables:
# BUILD_BLOCK_DIR [in]
# TARBALL [out]
#
find_tarball
()
{
local
-r
name
=
"
$1
"
local
version
=
"
$2
"
shift
2
local
-a
dirs
=(
"
${
BUILD_BLOCK_DIR
}
"
)
dirs
+
=(
"
$@
"
)
local
release
=
"
${
version
##*-
}
"
version
=
${
version
%-*
}
local
ext
for
dir
in
"
${
dirs
[@]
}
"
;
do
for
ext
in
tar
tar.gz tgz tar.bz2 tar.xz
;
do
local
fname
local
-a
fnames
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
OS
}
-
${
version
}
-
${
release
}
.
${
ext
}
"
)
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
OS
}
-
${
version
}
.
${
ext
}
"
)
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
version
}
-
${
release
}
.
${
ext
}
"
)
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
version
}
.
${
ext
}
"
)
for
fname
in
"
${
fnames
[@]
}
"
;
do
if
[[
-r
"
${
fname
}
"
]]
;
then
echo
"
${
fname
}
"
return
fi
done
done
done
std::error
"
${
name
}
/
${
version
}
: source not found."
exit
43
}
###############################################################################
#
# extract sources. For the time being only tar-files are supported.
#
pbuild::prep
()
{
#......................................................................
#
# Find tarball for given module.
# Sets global variable TARBALL if found or exit with error message.
#
# Arguments:
# $1: name
# $2: version
# $3...: download directories
#
# Used global variables:
# BUILD_BLOCK_DIR [in]
# TARBALL [out]
#
find_tarball
()
{
local
-r
name
=
"
$1
"
local
version
=
"
$2
"
shift
2
local
-a
dirs
=(
"
${
BUILD_BLOCK_DIR
}
"
)
dirs
+
=(
"
$@
"
)
local
release
=
"
${
version
##*-
}
"
version
=
${
version
%-*
}
local
ext
for
dir
in
"
${
dirs
[@]
}
"
;
do
for
ext
in
tar
tar.gz tgz tar.bz2 tar.xz
;
do
local
fname
local
-a
fnames
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
OS
}
-
${
version
}
-
${
release
}
.
${
ext
}
"
)
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
OS
}
-
${
version
}
.
${
ext
}
"
)
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
version
}
-
${
release
}
.
${
ext
}
"
)
fnames+
=(
"
${
dir
}
/
${
name
}
-
${
version
}
.
${
ext
}
"
)
for
fname
in
"
${
fnames
[@]
}
"
;
do
if
[[
-r
"
${
fname
}
"
]]
;
then
echo
"
${
fname
}
"
return
fi
done
done
done
std::error
"
${
name
}
/
${
version
}
: source not found."
exit
43
}
TARBALL
=
$(
find_tarball
"
${
P
/_serial
}
"
"
${
V
}
"
"
${
PMODULES_DISTFILESDIR
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment