diff --git a/README.md b/README.md index 13b4fae17..04dd1dd7d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # megacorp The starter repo for the [Git 2 course](https://www.boot.dev/learn/learn-git-2) on Boot.dev. + +This repository includes a small helper script under `scripts/scan.sh` that lists files in the project and reports the total count. diff --git a/scripts/scan.sh b/scripts/scan.sh index f4d9eb226..fc926fd19 100755 --- a/scripts/scan.sh +++ b/scripts/scan.sh @@ -1 +1,8 @@ -# TODO: write the script +#!/bin/sh +set -eu + +printf 'Scanning repository files...\n' +find . -maxdepth 2 -type f ! -path './.git/*' | sort +printf '\nTotal files: ' +find . -maxdepth 2 -type f ! -path './.git/*' | wc -l | tr -d ' ' +printf '\n'