commit: c5d97099620c2e6cfef5ed953cc71e9d61c620bd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 21:28:56 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 22 23:16:40 2022 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c5d97099
make-tarball.sh: more version fixups
- When falling back to _p, don't be clobbered by previous _pre logic
- Fix typo in index
- Later on, when figuring out gver, don't subtract twice
- Sync gver logic with earlier chunks too
Signed-off-by: Sam James <sam <AT> gentoo.org>
make-tarball.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/make-tarball.sh b/make-tarball.sh
index e76e37f..06e1216 100755
--- a/make-tarball.sh
+++ b/make-tarball.sh
@@ -25,6 +25,7 @@ if [[ $# -ne 1 ]] ; then
fi
ver=${1%/}
+orig_ver=${ver}
ebuild=$(find_ebuild ${ver})
@@ -49,10 +50,11 @@ if [[ -z ${ebuild} ]] ; then
fi
if [[ -z ${ebuild} ]] ; then
+ ver=${orig_ver}
ver=${ver%%_p*}
ver_major=$(echo ${ver} | cut -d'.' -f1)
- ver_minor=$(($(echo ${ver} | cut -d'.' -f3) - 1))
+ ver_minor=$(($(echo ${ver} | cut -d'.' -f2) - 1))
ver="${ver_major}.${ver_minor}.1_p*"
ebuild=$(find_ebuild ${ver})
@@ -80,7 +82,7 @@ if [[ ${had_pre} -eq 1 ]] ; then
gver="${gver_major}.${gver_minor}.0"
elif [[ ${had_p} -eq 1 ]] ; then
gver_major=$(echo ${gver} | cut -d'.' -f1)
- gver_minor=$(($(echo ${gver} | cut -d'.' -f3) - 1))
+ gver_minor=$(($(echo ${gver} | cut -d'.' -f2) + 1))
gver="${gver_major}.${gver_minor}.0"
fi