diff --git a/ChangeLog b/ChangeLog index 7dcd1c0..29c3714 100644 --- a/ChangeLog +++ b/ChangeLog @@ -53,6 +53,10 @@ Changes in version 1.12.3 * lib/libapse.lib, lib/libspec.lib - Davide Madrisan: Style fixes. ++ improvement + * lib/libapse.lib - Davide Madrisan: + Do not use 'dirname' and 'basename': bash provides primitives to do that. + ------------------------------------------------------------------------------- Changes in version 1.12.2 diff --git a/lib/libapse.lib.in b/lib/libapse.lib.in index 914e37a..19715ee 100644 --- a/lib/libapse.lib.in +++ b/lib/libapse.lib.in @@ -311,10 +311,10 @@ ${proxy:+ --proxy $proxy}${proxy_user:+ --proxy-user $proxy_user}" notify.debug "$FUNCNAME: skipping ${apse_site_name[0]}" else if [[ "$pckurl" =~ .*://.* ]]; then - local pckurldir="`dirname $pckurl`/" + local pckurldir="${pckurl%/*}/" notify.debug "$FUNCNAME: pckurldir = $pckurldir" - local pcknameverbatim=`basename $pckurlverbatim` + local pcknameverbatim="${pckurlverbatim##*/}" notify.debug "$FUNCNAME: pcknameverbatim = $pcknameverbatim" curr_curl_url="$pckurldir"