Make sure all patch files actually exist. Otherwise there can be confusing errors later.
Showing the changes to scripts/livepatch (1 of 1 file). Show all
Unified · Split
| @@ -157,6 +157,7 @@ process_args() { · 156 unmodified lines | |||
| 157 | local short | 157 | local short |
| 158 | local long | 158 | local long |
| 159 | local args | 159 | local args |
| 160 | local patch | ||
| 160 | 161 | ||
| 161 | short="hfj:o:vdS:T" | 162 | short="hfj:o:vdS:T" |
| 162 | long="help,show-first-changed,jobs:,output:,no-replace,verbose,debug,short-circuit:,keep-tmp" | 163 | long="help,show-first-changed,jobs:,output:,no-replace,verbose,debug,short-circuit:,keep-tmp" |
| @@ -235,6 +236,10 @@ process_args() { · 72 unmodified lines | |||
| 235 | 236 | ||
| 236 | KEEP_TMP="$keep_tmp" | 237 | KEEP_TMP="$keep_tmp" |
| 237 | PATCHES=("$@") | 238 | PATCHES=("$@") |
| 239 | |||
| 240 | for patch in "${PATCHES[@]}"; do | ||
| 241 | [[ -f "$patch" ]] || die "$patch doesn't exist" | ||
| 242 | done | ||
| 238 | } | 243 | } |
| 239 | 244 | ||
| 240 | # temporarily disable xtrace for especially verbose code | 245 | # temporarily disable xtrace for especially verbose code |