| | #!/bin/sh |
| |
|
| | |
| | generate_structure() { |
| | local dir_path=$1 |
| | local base_name=$(basename "$(dirname "$(dirname "$dir_path")")") |
| | local version=$(basename "$(dirname "$dir_path")") |
| | local flavor=$(basename "$dir_path") |
| | |
| | |
| | echo " ${base_name}-${version}-${flavor}-squash-custom:" |
| | echo " path: /${dir_path#./data/}"/ |
| | echo " files:" |
| |
|
| | |
| | for file in "$dir_path"/*; do |
| | echo " - $(basename "$file")" |
| | done |
| |
|
| | echo " os: ${base_name}-custom" |
| | echo " version: '$version'" |
| | echo " flavor: $flavor" |
| | echo " kernel: ${base_name}-${version}-${flavor}-squash-custom" |
| | echo "" |
| | } |
| |
|
| | |
| | find ./data -mindepth 4 -maxdepth 4 -type d | while read -r dir; do |
| | generate_structure "$dir" |
| | done |
| |
|
| |
|