From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EB7DA13888F for ; Fri, 23 Oct 2015 12:09:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 493E421C005; Fri, 23 Oct 2015 12:09:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B9F5321C005 for ; Fri, 23 Oct 2015 12:09:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C01B734063E for ; Fri, 23 Oct 2015 12:09:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C73171658 for ; Fri, 23 Oct 2015 12:09:38 +0000 (UTC) From: "Nicolas Bock" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nicolas Bock" Message-ID: <1445602157.9c34dfc592f7a74e9cbbbfa26e17d2a74860dd20.nicolasbock@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/lammps/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-physics/lammps/lammps-20151022.ebuild X-VCS-Directories: sci-physics/lammps/ X-VCS-Committer: nicolasbock X-VCS-Committer-Name: Nicolas Bock X-VCS-Revision: 9c34dfc592f7a74e9cbbbfa26e17d2a74860dd20 X-VCS-Branch: master Date: Fri, 23 Oct 2015 12:09:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9fe01c0e-a734-4a6e-87a1-4e0e617f8a1f X-Archives-Hash: d8af7efe6b7881dbab0f37579788a7f5 commit: 9c34dfc592f7a74e9cbbbfa26e17d2a74860dd20 Author: Nicolas Bock gentoo org> AuthorDate: Fri Oct 23 12:08:31 2015 +0000 Commit: Nicolas Bock gentoo org> CommitDate: Fri Oct 23 12:09:17 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c34dfc5 sci-physics/lammps: Simplified convert_month() function. Suggested by: hasufell gentoo.org Package-Manager: portage-2.2.20.1 sci-physics/lammps/lammps-20151022.ebuild | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/sci-physics/lammps/lammps-20151022.ebuild b/sci-physics/lammps/lammps-20151022.ebuild index 5400e87..39fd779 100644 --- a/sci-physics/lammps/lammps-20151022.ebuild +++ b/sci-physics/lammps/lammps-20151022.ebuild @@ -9,34 +9,8 @@ PYTHON_COMPAT=( python{2_7,3_3} ) inherit eutils flag-o-matic fortran-2 multilib python-r1 convert_month() { - case $1 in - 01) echo Jan - ;; - 02) echo Feb - ;; - 03) echo Mar - ;; - 04) echo Apr - ;; - 05) echo May - ;; - 06) echo Jun - ;; - 07) echo Jul - ;; - 08) echo Aug - ;; - 09) echo Sep - ;; - 10) echo Oct - ;; - 11) echo Nov - ;; - 12) echo Dec - ;; - *) echo unknown - ;; - esac + local months=( "" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ) + echo ${months[${1#0}]} } MY_P=${PN}-$((10#${PV:6:2}))$(convert_month ${PV:4:2})${PV:2:2}