Skip to content

Commit cd8abc7

Browse files
scripts/check-duplicates.sh: s/guru/science/g
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
1 parent 1e03404 commit cd8abc7

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎scripts/check-duplicates.sh‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# Maintainer: Andrew Ammerlaan <andrewammerlaan@riseup.net>
33
#
4-
# This checks if packages in ::guru are also in ::gentoo
4+
# This checks if packages in ::science are also in ::gentoo
55
#
66
# Note that this is not going to be 100% accurate
77
#
@@ -10,22 +10,22 @@
1010
printf "\nChecking for duplicates....\n"
1111

1212
gentoo_location="/var/db/repos/gentoo"
13-
guru_location="."
13+
science_location="."
1414

1515
gentoo_packs=$(find ${gentoo_location} -mindepth 2 -maxdepth 2 -printf "%P\n" | sort | grep -Ev "^(.git|.github|metadata|profiles|scripts)/")
16-
guru_packs=$(find ${guru_location} -mindepth 2 -maxdepth 2 -printf "%P\n" | sort | grep -Ev "^(.git|.github|metadata|profiles|scripts)/")
16+
science_packs=$(find ${science_location} -mindepth 2 -maxdepth 2 -printf "%P\n" | sort | grep -Ev "^(.git|.github|metadata|profiles|scripts)/")
1717

1818
pack_overrides="" pack_close_match_in_cat="" pack_close_match=""
19-
for guru_pack in ${guru_packs}; do
19+
for science_pack in ${science_packs}; do
2020
# separate category and packages
21-
guru_pack_cat="${guru_pack%%/*}"
22-
guru_pack_name="${guru_pack##*/}"
21+
science_pack_cat="${science_pack%%/*}"
22+
science_pack_name="${science_pack##*/}"
2323

2424
# convert all to lowercase
25-
guru_pack_name="${guru_pack_name,,}"
25+
science_pack_name="${science_pack_name,,}"
2626

2727
# stip all numbers, dashes, underscores and pluses
28-
guru_pack_name="${guru_pack_name/[0-9-_+]}"
28+
science_pack_name="${science_pack_name/[0-9-_+]}"
2929

3030
for gentoo_pack in ${gentoo_packs}; do
3131
# separate category and packages
@@ -40,15 +40,15 @@ for guru_pack in ${guru_packs}; do
4040

4141
#TODO: check DESCRIPTION, HOMEPAGE and SRC_URI for close matches
4242

43-
if [[ "${gentoo_pack_name}" == "${guru_pack_name}" ]]; then
44-
if [[ "${gentoo_pack_cat}" == "${guru_pack_cat}" ]]; then
45-
if [[ "${gentoo_pack}" == "${guru_pack}" ]]; then
46-
pack_overrides+="\t${guru_pack}::guru exact match of ${gentoo_pack}::gentoo\n"
43+
if [[ "${gentoo_pack_name}" == "${science_pack_name}" ]]; then
44+
if [[ "${gentoo_pack_cat}" == "${science_pack_cat}" ]]; then
45+
if [[ "${gentoo_pack}" == "${science_pack}" ]]; then
46+
pack_overrides+="\t${science_pack}::science exact match of ${gentoo_pack}::gentoo\n"
4747
else
48-
pack_close_match_in_cat+="\t${guru_pack}::guru possible duplicate of ${gentoo_pack}::gentoo\n"
48+
pack_close_match_in_cat+="\t${science_pack}::science possible duplicate of ${gentoo_pack}::gentoo\n"
4949
fi
5050
else
51-
pack_close_match+="\t${guru_pack}::guru possible duplicate of ${gentoo_pack}::gentoo\n"
51+
pack_close_match+="\t${science_pack}::science possible duplicate of ${gentoo_pack}::gentoo\n"
5252
fi
5353
fi
5454
done

0 commit comments

Comments
 (0)