Files
guru/dev-ruby/chruby/chruby-0.3.9-r3.ebuild
T
ingenarel (NeoJesus) 6481ca930b */*: Use [[ ... ]] instead of POSIX [ ... ]
as per the coding style guide:
https://projects.gentoo.org/qa/policy-guide/ebuild-format.html#pg0101

only these changes were done:

[ -e ... ]    to  [[ -e ... ]]
[ -z ... ]    to  [[ -z ... ]]
[ -n ... ]    to  [[ -n ... ]]
[ ! -f ... ]  to  [[ ! -f ... ]]
[ -f ... ]    to  [[ -f ... ]]
[ -d ... ]    to  [[ -d ... ]]

the changes were generated using this command:

```
find -name '*.ebuild' -exec sed -i -E \
's|([^[])\[+(\s+)([^]]+)(\s+)\]+([^]]\|$)|\1\[\[\2\3\4\]\]\5|g' \
{} \+
```

this is aimed to be a series of commits meant to replace all instance of
POSIX [ ... ] to bash's [[ ... ]], to make guru up to date with the
coding style guide.

this process is divided up into a series of commits in order to make
review and testing more easy

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
Part-of: https://codeberg.org/gentoo/guru/pulls/6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2026-09-25 18:48:54 +02:00

34 lines
825 B
Bash

# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Changes the current Ruby"
HOMEPAGE="https://github.com/postmodern/chruby"
SRC_URI="https://github.com/postmodern/chruby/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="test"
DEPEND="|| ( >=app-shells/bash-3.0:* app-shells/zsh )"
RDEPEND="${DEPEND}"
src_prepare() {
default
if [[ -n "${PVR}" ]] ; then
sed -i Makefile -e "s/^VERSION=${PV}$/VERSION=${PVR}/" \
|| die "can't fix doc location to follow Gentoo/FHS guidelines"
fi
}
src_install() {
# TODO: Remove `${D}` from PREFIX in >=chruby-0.3.10 (https://git.io/JPQ25)
emake DESTDIR="${D}" PREFIX="${D}/usr" install
insinto "/etc/profile.d"
newins "${FILESDIR}/systemwide.sh" "chruby.sh"
}