anchor.diff:    echo "  - command: \"run_tests "${test_dir}"\""
   done
   ```
  +{: codeblock-file="pipeline.sh"}
   
   To use this script, you'd save it to `.buildkite/pipeline.sh` inside your repository, ensure it is executable, and then update your pipeline upload step to use the new script:
   
  
positive.code: 
  ## Dynamic pipelines
  
  Because the pipeline upload step runs on your agent machine, you can generate pipelines dynamically using scripts from your source code. This provides you with the flexibility to structure your pipelines as you wish.
  
  The following example generates a list of parallel test steps based upon the `test/*` directories within your repository:
  
  ```
  #!/bin/bash
  
negative.code: ```
  {: codeblock-file="pipeline.yml"}
  
  ## Cloning a pipeline
  
  When creating a new pipeline, you can take a shortcut if you want to set up the new pipeline with the same steps as an existing pipeline.
  