From bdf13c6db7cdad32e43252e836b977dbb4af2640 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 2 Mar 2015 09:01:51 -0700 Subject: [PATCH] Fix createmodule.sh to handle exported functions (bug #1197321) --- createmodule.sh | 7 +++++-- environment-modules.spec | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/createmodule.sh b/createmodule.sh index 5a37b3e..f0b3b32 100755 --- a/createmodule.sh +++ b/createmodule.sh @@ -48,8 +48,11 @@ printenvarray () { env | while read x do key=${x%%=*} - value=${x#*=} - echo [$key]="'$value'" + value=`printenv "$key"` + if [ $? -eq 0 ] + then + echo [$key]="'$value'" + fi done } diff --git a/environment-modules.spec b/environment-modules.spec index 63d92dd..15057c5 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -2,7 +2,7 @@ Name: environment-modules Version: 3.2.10 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Provides dynamic modification of a user's environment Group: System Environment/Base @@ -140,6 +140,9 @@ fi %changelog +* Mon Mar 2 2015 Orion Poplwski - 3.2.10-14 +- Fix createmodule.sh to handle exported functions (bug #1197321) + * Wed Jan 28 2015 Orion Poplwski - 3.2.10-13 - Add patch for python 3 support, use python3 for createmodule.py on F22