mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-07-01 03:39:39 +02:00
Pmodules/libpbuild.bash
- derive source file name from source URL
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user