Fix: Strip path prefix in dirname
[releng/builder.git] / jjb / integration / distribution / distribution-check-verify-groupid.sh
index 9761dd14346692536dad2bcacb8095ffaddbeb4e..ce37f23816aa80483fda975f32c9a09846cd8f6d 100644 (file)
@@ -20,7 +20,9 @@ for PROJECT in /tmp/r/org/opendaylight/*; do
         continue
     fi
     echo "Checking $PROJECT"
-    if [[ "$ALLOW_PROJECTS" != *"$PROJECT"* ]]; then
+    # strip path from the dirname
+    base_dir="$(basename -- "$PROJECT")"
+    if [[ "$ALLOW_PROJECTS" != *"$base_dir"* ]]; then
         echo "ERROR: Not allowed project $PROJECT pulled"
         EXIT_CODE="1"
     fi