#!/usr/bin/env zsh

# This script flattens a folder hierarchy by moving all files in subdirectories to the root directory.

for file in **/*(.); do
  if [ -f "$file" ]; then
    mv "$file" .
  fi
done
