File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,22 +55,24 @@ jobs:
5555
5656 - name : Filter recipes by pkg_type
5757 run : |
58- mkdir -p /tmp/bincache-recipes /tmp/pkgcache-recipes /tmp/output
58+ mkdir -p /tmp/bincache-recipes/binaries /tmp/pkgcache-recipes/packages /tmp/output
5959
6060 # Find all recipes and filter by pkg_type
6161 for recipe in $(find binaries packages -name "*.yaml" -type f 2>/dev/null); do
6262 pkg_type=$(grep -E "^pkg_type:" "$recipe" | head -1 | sed 's/pkg_type:[[:space:]]*//; s/^["'"'"']//; s/["'"'"']$//' || echo "")
6363
64- # Create directory structure and copy recipe
65- rel_path=$(dirname "$recipe")
64+ # Extract package name (parent directory)
65+ pkg_name=$(basename "$(dirname "$recipe")")
66+ recipe_name=$(basename "$recipe")
67+
6668 if [ "$pkg_type" = "static" ] || [ "$pkg_type" = "dynamic" ]; then
6769 echo "BINCACHE: $recipe (pkg_type: $pkg_type)"
68- mkdir -p "/tmp/bincache-recipes/$rel_path "
69- cp "$recipe" "/tmp/bincache-recipes/$recipe "
70+ mkdir -p "/tmp/bincache-recipes/binaries/$pkg_name "
71+ cp "$recipe" "/tmp/bincache-recipes/binaries/$pkg_name/$recipe_name "
7072 else
7173 echo "PKGCACHE: $recipe (pkg_type: $pkg_type)"
72- mkdir -p "/tmp/pkgcache-recipes/$rel_path "
73- cp "$recipe" "/tmp/pkgcache-recipes/$recipe "
74+ mkdir -p "/tmp/pkgcache-recipes/packages/$pkg_name "
75+ cp "$recipe" "/tmp/pkgcache-recipes/packages/$pkg_name/$recipe_name "
7476 fi
7577 done
7678
You can’t perform that action at this time.
0 commit comments