xref: /aosp_15_r20/external/pytorch/tools/git_add_generated_dirs.sh (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1#!/bin/sh
2
3# HOW TO USE:
4# 1) python setup.py ...
5# 2) tools/git_add_generated_dirs
6# 3) Edit codegen
7# 4) python setup.py ...
8# 5) git diff to see changes
9# 6) If satisfied: tools/git_reset_generated_dirs, commit, etc.
10#    If not satisfied: Go to 3)
11
12BASEDIR=$(dirname "$0")
13(< $BASEDIR/generated_dirs.txt xargs -i find {} -type f) | xargs git add -f
14