These are often a good idea, but not necessary here and are distracting to the tutorial, so let's just take them out. Reported-by: Jeff Stearns <jeff.stearns@gmail.com>
19 lines
337 B
Text
19 lines
337 B
Text
fs=${1%.fs}
|
|
redo-ifchange simple.fs
|
|
|
|
rm -rf "$fs"
|
|
cp -a simple/. "$fs"
|
|
|
|
for full in "$fs"/bin/*; do
|
|
if [ -x "$full" ]; then
|
|
ldd "$full" | while read a b c junk; do
|
|
[ "$b" = "=>" ] && a=$c
|
|
if [ -e "$a" ]; then
|
|
mkdir -p "$fs/lib" "$fs/$(dirname "$a")"
|
|
cp -f "$a" "$fs/$a"
|
|
fi
|
|
done
|
|
fi
|
|
done
|
|
|
|
redo-ifchange "$fs/bin/sh"
|