"Fossies" - the Fresh Open Source Software Archive

Member "pytorch-1.8.2/tools/git_add_generated_dirs.sh" (23 Jul 2021, 353 Bytes) of package /linux/misc/pytorch-1.8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 
   12 BASEDIR=$(dirname "$0")
   13 (< $BASEDIR/generated_dirs.txt xargs -i find {} -type f) | xargs git add -f