*/*: 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>
This commit is contained in:
ingenarel (NeoJesus) authored and Michał Górny committed 2026-09-25 18:48:54 +02:00
1 parent d56f4baa37
commit 6481ca930b
15 files changed
+27 -27

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ src_unpack() {
)
use gnome-keyring && list+=( dep_git_git )
for i in "${list[@]}"; do
[ ! -f "${DISTDIR}/${P}-${i}.tar.gz" ] && die "The file ${DISTDIR}/${P}-${i}.tar.gz doesn't exist"
[[ ! -f "${DISTDIR}/${P}-${i}.tar.gz" ]] && die "The file ${DISTDIR}/${P}-${i}.tar.gz doesn't exist"
tar xf "${DISTDIR}/${P}-${i}.tar.gz" --strip-components 1 -C "${i//_//}" || die "Failed to unpack ${P}-${i}.tar.gz"
done
}