diff --git a/common/xbps-src/shutils/purge_distfiles.sh b/common/xbps-src/shutils/purge_distfiles.sh index ebcc978978d..857bb3f8631 100755 --- a/common/xbps-src/shutils/purge_distfiles.sh +++ b/common/xbps-src/shutils/purge_distfiles.sh @@ -25,7 +25,8 @@ purge_distfiles() { fi percent=-1 for template in ${templates[@]}; do - pkg="$(echo "$template" | cut -d / -f 2)" + pkg=${template#*/} + pkg=${pkg%/*} if [ ! -L "srcpkgs/$pkg" ]; then unset checksum source $template 2>/dev/null