Skip to content

Instantly share code, notes, and snippets.

@lolpack
Created September 30, 2025 17:23
Show Gist options
  • Select an option

  • Save lolpack/01501cdd90893a5bff7d7511615c90a0 to your computer and use it in GitHub Desktop.

Select an option

Save lolpack/01501cdd90893a5bff7d7511615c90a0 to your computer and use it in GitHub Desktop.
Simulate python interpreter files being touched
#!/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