Skip to content

slyckmb/bash-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bash-tools

CLI scripts for Bash automation and tooling.

This repo currently contains:

  • split_subdir_to_repo.sh
    Extracts a subdirectory from a Git monorepo into a new standalone GitHub repository, preserving history and optionally copying a virtualenv.

🔍 Test Coverage

  • split_subdir_to_repo.shrev4.2
  • Framework: bats-core
  • Location: bash-test-tools/tests/test_split_subdir_to_repo.bats
  • CI-safe: gh, git, and git-filter-repo calls stubbed
  • ✅ Last verified at rev4.2

✅ CI Status

CI


🛠️ Tool Usage

./split_subdir_to_repo.sh <subdir> <target-dir-name> <github-repo-name> [--repo <path>] [--target-dir <dir>] [--dryrun]

Positional Args:

  • <subdir>: Subdirectory inside monorepo to extract
  • <target-dir-name>: Folder name to use for new extracted repo
  • <github-repo-name>: Name of the GitHub repo to create via gh

Optional Flags:

  • --repo <path>: Path to source repo (defaults to current dir)
  • --target-dir <dir>: Override where the extracted repo is created
  • --dryrun: Print actions without executing them

Example:

./split_subdir_to_repo.sh foo foo-repo slyckmb/foo-repo \
  --repo ~/src/monorepo \
  --target-dir /tmp/export \
  --dryrun

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published