aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2015-10-31 17:03:53 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2015-11-05 17:37:27 +0000
commit2417d6394385efdc6ad80e310c81f05e9c8c0e6f (patch)
treea9f16de4b0035a2a9ea0602737ddf98665d42713 /paludis/repositories/e/ebuild
parent5d4398de107163d2c1b826d898a7051e6dfe1b6a (diff)
downloadpaludis-2417d6394385efdc6ad80e310c81f05e9c8c0e6f.tar.gz
paludis-2417d6394385efdc6ad80e310c81f05e9c8c0e6f.tar.xz
EAPI 6 unpack is case-insensitive
Diffstat (limited to 'paludis/repositories/e/ebuild')
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/unpack22
1 files changed, 14 insertions, 8 deletions
diff --git a/paludis/repositories/e/ebuild/utils/unpack b/paludis/repositories/e/ebuild/utils/unpack
index 3025685f9..5f154cb25 100755
--- a/paludis/repositories/e/ebuild/utils/unpack
+++ b/paludis/repositories/e/ebuild/utils/unpack
@@ -111,16 +111,20 @@ unpack_xz() {
unpack_one()
{
- [[ -z ${1} ]] && die "Bad argument for unpack_one"
- [[ -e ${1} ]] || die "${1} doesn't exist"
+ local file=${1} compare=${1}
+ [[ -n ${PALUDIS_UNPACK_CASE_INSENSITIVE} ]] &&
+ compare=$(tr '[:upper:]' '[:lower:]' <<<"${compare}")
+
+ [[ -z ${file} ]] && die "Bad argument for unpack_one"
+ [[ -e ${file} ]] || die "${file} doesn't exist"
if [[ -n "${UNPACKONLY}" ]] ; then
- case ${1} in
+ case ${compare} in
*.tar.bz2|*.tbz2|*.tbz)
;;
*)
- die "Can't use --only with ${x}"
+ die "Can't use --only with ${file}"
;;
esac
fi
@@ -129,17 +133,19 @@ unpack_one()
for group in ${PALUDIS_UNPACK_SUFFIXES}; do
split=( $(IFS=,; echo ${group} ) )
for suffix in ${split[@]}; do
- if [[ ${1} == *.${suffix} ]]; then
- unpack_${split[0]} "${1}" || die "Couldn't unpack ${1}"
+ [[ -n ${PALUDIS_UNPACK_CASE_INSENSITIVE} ]] &&
+ suffix=$(tr '[:upper:]' '[:lower:]' <<<"${suffix}")
+ if [[ ${compare} == *.${suffix} ]]; then
+ unpack_${split[0]} "${file}" || die "Couldn't unpack ${file}"
return
fi
done
done
if [[ -n "${PALUDIS_UNPACK_UNRECOGNISED_IS_FATAL}" ]] ; then
- die "Don't know how to unpack ${x}"
+ die "Don't know how to unpack ${file}"
else
- echo "Skipping unpack for ${1}"
+ echo "Skipping unpack for ${file}"
fi
}