Pmodules/libpbuild.bash

- derive source file name from source URL
This commit is contained in:
2018-02-15 17:41:33 +01:00
parent 2dbaf9d5b0
commit 3a1f7e0fed
+2 -7
View File
@@ -186,13 +186,8 @@ pbuild::get_source() {
local -r url="$2"
shift 2
dirs+=( "$@" )
local -a fnames=()
local extension=''
if [[ "${url}" =~ ".tar." ]]; then
extension+='tar.'
fi
extension+="${url##*.}"
fname="$P-$V_PKG.${extension}"
fname="${url##*/}"
dirs+=( 'not found' )
for dir in "${dirs[@]}"; do
[[ -r "${dir}/${fname}" ]] && break