George Liu | ff92ffe | 2021-02-09 15:01:53 +0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # config: 5 1 |
| 4 | # @brief: Move the ramoops data file to the dreport packaging. |
| 5 | # |
| 6 | |
Patrick Williams | 78942d6 | 2022-12-05 22:00:41 -0600 | [diff] [blame] | 7 | # shellcheck source=tools/dreport.d/include.d/functions |
| 8 | . "$DREPORT_INCLUDE/functions" |
George Liu | ff92ffe | 2021-02-09 15:01:53 +0800 | [diff] [blame] | 9 | |
| 10 | desc="Ramoops file" |
| 11 | |
Patrick Williams | 78942d6 | 2022-12-05 22:00:41 -0600 | [diff] [blame] | 12 | if [ -n "${optional_path}" ]; then |
| 13 | for path in "${optional_path}"/* |
| 14 | do |
| 15 | if [ -f "$path" ]; then |
| 16 | # Remove the file from path after successful copy |
| 17 | if add_copy_file "$path" "$desc"; then |
| 18 | rm "$path" |
| 19 | fi |
George Liu | ff92ffe | 2021-02-09 15:01:53 +0800 | [diff] [blame] | 20 | fi |
Patrick Williams | 78942d6 | 2022-12-05 22:00:41 -0600 | [diff] [blame] | 21 | done |
| 22 | fi |