summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gentoo.org>2015-10-23 06:08:31 -0600
committerNicolas Bock <nicolasbock@gentoo.org>2015-10-23 06:09:17 -0600
commit9c34dfc592f7a74e9cbbbfa26e17d2a74860dd20 (patch)
tree2aa3fd55551a2feb68b24c819212eeb34e4941e6 /sci-physics/lammps
parentRevert "bitcoincore: Bump to 0.11.1" (diff)
downloadgentoo-9c34dfc592f7a74e9cbbbfa26e17d2a74860dd20.tar.gz
gentoo-9c34dfc592f7a74e9cbbbfa26e17d2a74860dd20.tar.bz2
gentoo-9c34dfc592f7a74e9cbbbfa26e17d2a74860dd20.zip
sci-physics/lammps: Simplified convert_month() function.
Suggested by: hasufell@gentoo.org Package-Manager: portage-2.2.20.1
Diffstat (limited to 'sci-physics/lammps')
-rw-r--r--sci-physics/lammps/lammps-20151022.ebuild30
1 files changed, 2 insertions, 28 deletions
diff --git a/sci-physics/lammps/lammps-20151022.ebuild b/sci-physics/lammps/lammps-20151022.ebuild
index 5400e87baefb..39fd77910e55 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}