2021-01-22 16:44:05 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-12-27 14:26:43 +00:00
|
|
|
|
|
|
|
set -eo pipefail
|
2020-07-27 04:33:48 +00:00
|
|
|
|
|
|
|
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
|
|
|
cd "$script_path/.."
|
|
|
|
|
|
|
|
# The dollar symbol in sed's argument is for "end of line", not any shell variable.
|
|
|
|
# shellcheck disable=SC2016
|
2021-10-26 18:08:39 +00:00
|
|
|
grep -Eirh '(?<!file://)(?<!\.)(?<!})(?<!\()/(etc|res|usr|www)/' AK/ Base DevTools/ Documentation/ Kernel/ Services/ Userland/ | \
|
2020-07-27 04:33:48 +00:00
|
|
|
sed -re 's,^.*["= `]/([^"%`: ]+[^"%`: /.])/?(["%`: .].*)?$,\1,' | \
|
|
|
|
sort -u | \
|
|
|
|
while read -r referenced_resource
|
|
|
|
do
|
|
|
|
if ! [ -r "Base/${referenced_resource}" ] && ! [ -r "Build/Root/${referenced_resource}" ]
|
|
|
|
then
|
|
|
|
echo "Potentially missing resource: ${referenced_resource}"
|
|
|
|
fi
|
|
|
|
done
|