| 1 | |
| 2 | |
| 3 | |
| 4 |
|
| 5 | err=0
|
| 6 |
|
| 7 | cleanup() {
|
| 8 | trap - EXIT TERM INT
|
| 9 | }
|
| 10 |
|
| 11 | trap_cleanup() {
|
| 12 | echo "Unexpected signal in ${FUNCNAME[1]}"
|
| 13 | cleanup
|
| 14 | exit 1
|
| 15 | }
|
| 16 | trap trap_cleanup EXIT TERM INT
|
| 17 |
|
| 18 | shelldir=$(dirname "$0")
|
| 19 | perf_path=$(which perf)
|
| 20 | python "${shelldir}"/lib/attr.py -d "${shelldir}"/attr -v -p "$perf_path"
|
| 21 | cleanup
|
| 22 | exit $err
|