Bug 526505 - [COMPONENTS] add meta to the script
Change-Id: I7f134b9731d1b8e9458649a44957e5d1860d40a2
Signed-off-by: Francois Le Fevre <francois.le-fevre@cea.fr>
diff --git a/components/org.eclipse.papyrus.components.parent/src/main/script/publish.sh b/components/org.eclipse.papyrus.components.parent/src/main/script/publish.sh
index 831997c..37f0531 100755
--- a/components/org.eclipse.papyrus.components.parent/src/main/script/publish.sh
+++ b/components/org.eclipse.papyrus.components.parent/src/main/script/publish.sh
@@ -111,8 +111,18 @@
fi
# Determine the local update site we want to publish to
+echo "Listing ~/.hudson/jobs/"
+ls -la ~/.hudson/jobs/
+
jobDir=$(readlink -f ~/.hudson/jobs/${jobName}/builds/${buildId})
-if [ ! -d $jobDir ];
+
+if [ -z $jobDir ];
+then
+ echo "The specified buildId does not refer to an existing build: $buildId , see ${jobName} at ~/.hudson/jobs/${jobName}/builds/${buildId}"
+ exit 1
+fi
+
+if [ ! -d "$jobDir" ];
then
echo "The specified buildId does not refer to an existing build: $buildId , see ${jobName} at ~/.hudson/jobs/${jobName}/builds/${buildId}"
exit 1