From cc5c802da7ca60513d3d034a2a4de6ea55d99eea Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 26 Jan 2014 14:42:45 +0100 Subject: [PATCH] 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 --- .../files/slave_scripts/check_projects_yaml_alphabetized.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/check_projects_yaml_alphabetized.sh b/modules/jenkins/files/slave_scripts/check_projects_yaml_alphabetized.sh index 1b05a28e7b..3951f8fa0e 100755 --- a/modules/jenkins/files/slave_scripts/check_projects_yaml_alphabetized.sh +++ b/modules/jenkins/files/slave_scripts/check_projects_yaml_alphabetized.sh @@ -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