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:
parent
a2413944d3
commit
cc5c802da7
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
export TMPDIR=`/bin/mktemp -d`
|
export TMPDIR=`/bin/mktemp -d`
|
||||||
trap "rm -rf $TMPDIR" EXIT
|
trap "rm -rf $TMPDIR" EXIT
|
||||||
|
|
||||||
|
pushd $TMPDIR
|
||||||
|
|
||||||
if [ -f $OLDPWD/modules/openstack_project/templates/review.projects.yaml.erb ]
|
if [ -f $OLDPWD/modules/openstack_project/templates/review.projects.yaml.erb ]
|
||||||
then
|
then
|
||||||
PROJECTS_LIST=$OLDPWD/modules/openstack_project/templates/review.projects.yaml.erb
|
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
|
PROJECTS_LIST=$OLDPWD/modules/openstack_project/files/review.projects.yaml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd $TMPDIR
|
|
||||||
|
|
||||||
sed -e '/^- project: /!d' -e 's/^- project: //' $PROJECTS_LIST > projects_list
|
sed -e '/^- project: /!d' -e 's/^- project: //' $PROJECTS_LIST > projects_list
|
||||||
|
|
||||||
LC_ALL=C sort --ignore-case projects_list -o projects_list.sorted
|
LC_ALL=C sort --ignore-case projects_list -o projects_list.sorted
|
||||||
|
Loading…
Reference in New Issue
Block a user