Skip to content

Commit

Permalink
beesh: Improve filename guessing for fetched source archives
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Feb 28, 2013
1 parent f19e194 commit 022645d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,15 @@ function bee_init_builddir() {
# fetch_one_file <url> [filename]

function fetch_one_file() {
url=$1
file=${2:-${url##*/}}
local url="${1}"
local file="${2}"
local guessed_filename="${url##*/}"

guessed_filename=${guessed_filename%%\?*}
guessed_filename=${guessed_filename%%#*}
guessed_filename=${guessed_filename%/}

: ${file:=${guessed_filename}}

if [ "${url:0:8}" = "file:///" ] ; then
url=${url:7}
Expand Down

0 comments on commit 022645d

Please sign in to comment.