cleanup-prebuilt-dir.sh (388B)
1 #!/bin/bash 2 set -e 3 4 [ ! -d prebuilt ] && git worktree add -f prebuilt prebuilt && exit 1 5 6 if output=$(git status --porcelain) && [ ! -z "$output" ]; then 7 echo Cannot apply to a dirty working tree, please stage your changes 8 exit 1 9 fi 10 11 # make sure that the prebuilt directory is clean 12 # before building 13 # this script is part of the make prebuilt 14 cd prebuilt 15 git checkout -- . 16 git pull