Created
September 30, 2025 17:23
-
-
Save lolpack/01501cdd90893a5bff7d7511615c90a0 to your computer and use it in GitHub Desktop.
Simulate python interpreter files being touched
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Usage: | |
| # ./touch_stdlib_py.sh /Library/Frameworks/Python.framework/Versions/3.12 | |
| # | |
| # This will touch all .py files under .../lib/python3.12/ | |
| if [[ $# -ne 1 ]]; then | |
| echo "Usage: $0 <interpreter-root>" >&2 | |
| exit 1 | |
| fi | |
| ROOT="$1" | |
| LIBDIR="$ROOT/lib/python3.12" | |
| if [[ ! -d "$LIBDIR" ]]; then | |
| echo "Error: $LIBDIR not found" >&2 | |
| exit 2 | |
| fi | |
| echo "Touching .py files in $LIBDIR ..." | |
| find "$LIBDIR" -type f -name "*.py" -print -exec touch -m {} \; | |
| echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment