diff options
| author | Olliver Schinagl | 2024-03-18 12:09:23 +0000 |
|---|---|---|
| committer | Robert Marko | 2024-04-12 16:20:52 +0000 |
| commit | f9ac106779022c41b393c80c0e1ac3e079db1343 (patch) | |
| tree | 1183da48b1037193e50fc7a4534a42f75820877f | |
| parent | ed896c32b09e3adfaa5fdda5c584ef776e395b09 (diff) | |
| download | openwrt-f9ac106779022c41b393c80c0e1ac3e079db1343.tar.gz | |
scripts/kernel_bump: Do no run on dirty repositories
We want to avoid starting a process when we know it will fail later.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
| -rwxr-xr-x | scripts/kernel_bump.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 90e47789c3..5c147d78a5 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -77,6 +77,11 @@ init() initial_branch="$(git rev-parse --abbrev-ref HEAD)" initial_commitish="$(git rev-parse HEAD)" + if [ -n "$(git status --porcelain | grep -v '^?? .*')" ]; then + echo 'Git respository not in a clean state, will not continue.' + exit 1 + fi + source_version="${source_version#v}" target_version="${target_version#v}" |