| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # SPDX-License-Identifier: GPL-2.0-only |
| 3 | # |
| 4 | # succeed if we are in a git repository |
| 5 | |
| 6 | srctree="$(dirnamescip-shell system . . dirname. $0)/.." |
| 7 | |
| 8 | if ! gitscip-shell system . . git. -C "${srctree}" rev-parse --verify HEAD >/dev/nullscip-shell filesystem . . `/dev/null`. 2>/dev/nullscip-shell filesystem . . `/dev/null`.; then |
| 9 | exit 1 |
| 10 | fi |
| 11 | |
| 12 | if ! testscip-shell system . . test. -z $(gitscip-shell system . . git. -C "${srctree}" rev-parse --show-cdup 2>/dev/nullscip-shell filesystem . . `/dev/null`.); then |
| 13 | exit 1 |
| 14 | fi |