Fix check_projects_yaml_alphabetized.sh

The previous patch moved " PROJECTS_LIST=$OLDPWD/modules/..." before
the pushd call. But pushd changes the path and thus OLDPWD as well.

So, there are two possible fixes: Either remove the OLDPWD variable from
the if and set PROJECTS_LIST in another way with a full path or
move the pushd call before the if.

Change-Id: If47ab0cfb0078d5e570057c974e3d1f0367d4e0a
This commit is contained in:
Andreas Jaeger 2014-01-26 14:42:45 +01:00
parent a2413944d3
commit cc5c802da7

View File

@ -5,6 +5,9 @@
export TMPDIR=`/bin/mktemp -d`
trap "rm -rf $TMPDIR" EXIT
pushd $TMPDIR
if [ -f $OLDPWD/modules/openstack_project/templates/review.projects.yaml.erb ]
then
PROJECTS_LIST=$OLDPWD/modules/openstack_project/templates/review.projects.yaml.erb
@ -12,8 +15,6 @@ else
PROJECTS_LIST=$OLDPWD/modules/openstack_project/files/review.projects.yaml
fi
pushd $TMPDIR
sed -e '/^- project: /!d' -e 's/^- project: //' $PROJECTS_LIST > projects_list
LC_ALL=C sort --ignore-case projects_list -o projects_list.sorted