| 1 | #!/bin/sh |
| 2 | |
| 3 | before=$1 |
| 4 | after=$2 |
| 5 | |
| 6 | # https://unix.stackexchange.com/questions/418429/find-intersection-of-lines-in-two-files |
| 7 | awk 'BEGIN{while( (getline k < "'"$before"'")>0 ){a[k]}} $0 in a' "$after" > removed_artifacts.txt |
| 8 | |
| 9 | xargs -a removed_artifacts.txt rm |
| 10 | |
| 11 | for d in _install_ci saved_build_ci; do |
| 12 | if [ -d $d ]; then |
| 13 | find $d -type d -empty -delete |
| 14 | fi |
| 15 | done |