Add find-recipe.sh, move changelog.sh to scripts
This commit is contained in:
parent
bbeb98c7e9
commit
1156bf27e6
1 changed files with 91 additions and 0 deletions
42
scripts/find-recipe.sh
Executable file
42
scripts/find-recipe.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Ensure arch and config are set as desired, we use these to find the build dir
|
||||
export ARCH=x86_64
|
||||
export CONFIG_NAME=desktop
|
||||
|
||||
# Make sure to unmount the image first
|
||||
make unmount &>/dev/null || true
|
||||
|
||||
# Mount the image
|
||||
make mount >/dev/null
|
||||
|
||||
# Find all files
|
||||
find "build/${ARCH}/${CONFIG_NAME}/" -type f | cut -d / -f5- |\
|
||||
sort |\
|
||||
uniq |\
|
||||
while read path
|
||||
do
|
||||
# Skip empty paths
|
||||
if [ -z "${path}" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Find all packages providing this file
|
||||
pkgs="$(
|
||||
find cookbook/recipes/*"/target/${ARCH}-unknown-redox/stage/${path}" -type f 2>/dev/null |
|
||||
cut -d/ -f3 |
|
||||
tr '\n' ' ' |
|
||||
sort |
|
||||
uniq
|
||||
)"
|
||||
if [ -n "${pkgs}" ]
|
||||
then
|
||||
echo "$path: ${pkgs}"
|
||||
else
|
||||
echo "$path: no packages, see config/${ARCH}/${CONFIG_NAME}.toml"
|
||||
fi
|
||||
done
|
||||
|
||||
# Make sure to unmount the image
|
||||
make unmount &>/dev/null || true
|
||||
Loading…
Reference in a new issue