Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
alpine
abuild
Commits
60dda678
Commit
60dda678
authored
Nov 21, 2013
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
newapkbuild: detect github archives
parent
b4fb3c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
newapkbuild.in
newapkbuild.in
+16
-1
No files found.
newapkbuild.in
View file @
60dda678
...
...
@@ -23,6 +23,13 @@ is_url() {
return
1
}
is_github_url
()
{
case
$1
in
https://github.com/
*
/
*
/archive/
*
.tar.gz
)
return
0
;;
esac
return
1
}
# Build sections
build_make
()
{
cat
>>
APKBUILD
<<
__EOF__
...
...
@@ -91,7 +98,15 @@ newaport() {
local source
=
is_url
"
$1
"
&&
source
=
"
$1
"
if
[
"
$pn
"
!=
"
$newname
"
]
;
then
if
is_github_url
$source
;
then
if
[
-z
"
$pkgname
"
]
;
then
pkgname
=
${
source
%/archive/*
}
pkgname
=
${
pkgname
##*/
}
fi
pv
=
${
newname
%.t*
}
#strip .tar.gz .tgz .tar.bz2 etc
pv
=
${
pv
#*[a-z]
}
source
=
"
$pkgname
-
$pv
.tar.gz::
$source
"
elif
[
"
$pn
"
!=
"
$newname
"
]
;
then
pv
=
${
newname
#
$pn
-
}
pv
=
${
pv
%.t*
}
#strip .tar.gz .tgz .tar.bz2 etc
fi
...
...
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