CRUX-ARM :
Home
Home
::
Documentation
::
Download
::
Development
::
Community
::
Ports
::
Packages
::
Bugs
::
Links
::
About
::
Donors
development
/
pkgutils-cross.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51c534c
)
Bug #336: Only accept http/https/ftp/file protocols in sources.
author
Juergen Daubert
<jue@jue.li>
Sat, 1 Nov 2008 17:17:44 +0000
(18:17 +0100)
committer
Tilman Sauerbeck
<tilman@crux.nu>
Sat, 1 Nov 2008 17:17:44 +0000
(18:17 +0100)
pkgmk.in
patch
|
blob
|
blame
|
history
diff --git
a/pkgmk.in
b/pkgmk.in
index 00d8e954720888c3e42806ea0841bdde1615e7bd..9fdf768e3a10de5101ba4fec7dcf43ecf4123c43 100755
(executable)
--- a/
pkgmk.in
+++ b/
pkgmk.in
@@
-34,13
+34,11
@@
error() {
}
get_filename() {
- local FILE="`echo $1 | sed 's|^.*://.*/||g'`"
-
- if [ "$FILE" != "$1" ]; then
- FILE="$PKGMK_SOURCE_DIR/$FILE"
+ if [[ $1 =~ ^(http|https|ftp|file)://.*/(.+) ]]; then
+ echo "$PKGMK_SOURCE_DIR/${BASH_REMATCH[2]}"
+ else
+ echo $1
fi
-
- echo $FILE
}
get_basename() {