--- /dev/null
+#!/usr/bin/env bash
+
+#
+# This script uses Jenkins Job Builder to generate the configuration for its own
+# job so that it automatically configures all other jobs that have their YAML
+# definitions.
+#
+
+set -ex
+
+# Create the virtualenv
+virtualenv venv
+. venv/bin/activate
+
+# Define and ensure the PIP cache
+PIP_SDIST_INDEX="$HOME/.cache/pip"
+mkdir -p $PIP_SDIST_INDEX
+
+# Install the package by trying with the cache first, otherwise doing a download only, and then
+# trying to install from the cache again.
+if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index jenkins-job-builder; then
+ venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" jenkins-job-builder
+ venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index jenkins-job-builder
+fi
+
+# Test every definition if available in the current repository and update the jobs
+# if they do define one (they should always define their definitions)
+for dir in `find . -maxdepth 1 -path ./.git -prune -o -type d -print`; do
+ definitions_dir="$dir/config/definitions"
+ if [ -d "$definitions_dir" ]; then
+ echo "found definitions directory: $definitions_dir"
+
+ # Test the definitions first
+ venv/bin/jenkins-jobs test $definitions_dir -o /tmp/output
+
+ # Update Jenkins with the output if they passed the test phase
+ # Note that this needs proper permissions with the right credentials to the
+ # correct Jenkins instance.
+ venv/bin/jenkins-jobs update $definitions_dir
+ fi
+done
+++ /dev/null
-#!/usr/bin/env bash
-
-#
-# This script uses Jenkins Job Builder to generate the configuration for its own
-# job so that it automatically configures all other jobs that have their YAML
-# definitions.
-#
-
-set -ex
-
-# Create the virtualenv
-virtualenv venv
-. venv/bin/activate
-
-# Define and ensure the PIP cache
-PIP_SDIST_INDEX="$HOME/.cache/pip"
-mkdir -p $PIP_SDIST_INDEX
-
-# Install the package by trying with the cache first, otherwise doing a download only, and then
-# trying to install from the cache again.
-if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index jenkins-job-builder; then
- venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" jenkins-job-builder
- venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index jenkins-job-builder
-fi
-
-# Test every definition if available in the current repository and update the jobs
-# if they do define one (they should always define their definitions)
-for dir in `find . -maxdepth 1 -path ./.git -prune -o -type d -print`; do
- definitions_dir="$dir/config/definitions"
- if [ -d "$definitions_dir" ]; then
- echo "found definitions directory: $definitions_dir"
-
- # Test the definitions first
- venv/bin/jenkins-jobs test $definitions_dir -o /tmp/output
-
- # Update Jenkins with the output if they passed the test phase
- # Note that this needs proper permissions with the right credentials to the
- # correct Jenkins instance.
- venv/bin/jenkins-jobs update $definitions_dir
- fi
-done