mirror of
https://github.com/pygos/build.git
synced 2024-11-14 15:37:11 +01:00
Cleanup: move path filtering into pkg_scan_dir
Instead of prefixing the search path with $PKGDEPLOYDIR and then stripping the prefix off again every single time, do that inside the pkg_scan_dir function. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
2dc8bd9cd6
commit
21342dee8e
7 changed files with 17 additions and 19 deletions
|
@ -12,8 +12,7 @@ deploy() {
|
|||
cp -r ${SOURCE}/boot/* "$PKGDEPLOYDIR/"
|
||||
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
||||
|
||||
pkg_scan_dir "$PKGDEPLOYDIR/overlays" |\
|
||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/boot-rpi-dtbo.files"
|
||||
pkg_scan_dir "overlays" >> "$PKGDEPLOYDIR/boot-rpi-dtbo.files"
|
||||
}
|
||||
|
||||
check_update() {
|
||||
|
|
|
@ -67,9 +67,7 @@ deploy() {
|
|||
|
||||
echo "dir lib 0755 0 0" > "$PKGDEPLOYDIR/linux-modules.files"
|
||||
|
||||
pkg_scan_dir "$PKGDEPLOYDIR/lib" | \
|
||||
sed "s#$PKGDEPLOYDIR/##g" \
|
||||
>> "$PKGDEPLOYDIR/linux-modules.files"
|
||||
pkg_scan_dir "lib" >> "$PKGDEPLOYDIR/linux-modules.files"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
|
@ -20,6 +20,5 @@ deploy() {
|
|||
|
||||
echo "dir include 0755 0 0" > "$PKGDEPLOYDIR/linux-dev.files"
|
||||
|
||||
pkg_scan_dir "$PKGDEPLOYDIR/include" |\
|
||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
|
||||
pkg_scan_dir "include" >> "$PKGDEPLOYDIR/linux-dev.files"
|
||||
}
|
||||
|
|
|
@ -60,8 +60,7 @@ deploy() {
|
|||
cp libssp_nonshared.a "$PKGDEPLOYDIR/lib"
|
||||
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/libc-dev.files" "$PKGDEPLOYDIR"
|
||||
pkg_scan_dir "$PKGDEPLOYDIR/include" |\
|
||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/libc-dev.files"
|
||||
pkg_scan_dir "include" >> "$PKGDEPLOYDIR/libc-dev.files"
|
||||
|
||||
if [ "x$TC_HARDENING" = "xyes" ]; then
|
||||
echo "requires libc linux-dev fortify-headers" > \
|
||||
|
|
|
@ -80,8 +80,7 @@ deploy() {
|
|||
echo "dir srv 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
|
||||
echo "dir srv/www 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
|
||||
|
||||
pkg_scan_dir "$PKGDEPLOYDIR/srv/www" |\
|
||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
|
||||
pkg_scan_dir "srv/www" >> "$PKGDEPLOYDIR/nginx.files"
|
||||
fi
|
||||
|
||||
cat_file_override "nginx.conf" > "$PKGDEPLOYDIR/etc/nginx/nginx.conf"
|
||||
|
|
|
@ -21,11 +21,8 @@ deploy() {
|
|||
|
||||
sed -i 's@/usr@@g' "$PKGDEPLOYDIR/bin/tzselect"
|
||||
|
||||
pkg_scan_dir "$PKGDEPLOYDIR/share/zoneinfo" | \
|
||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/tzdata.files"
|
||||
|
||||
pkg_scan_dir "$PKGDEPLOYDIR/share/zoneinfo-leaps" | \
|
||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/tzdata.files"
|
||||
pkg_scan_dir "share/zoneinfo" >> "$PKGDEPLOYDIR/tzdata.files"
|
||||
pkg_scan_dir "share/zoneinfo-leaps" >> "$PKGDEPLOYDIR/tzdata.files"
|
||||
}
|
||||
|
||||
check_update() {
|
||||
|
|
|
@ -9,9 +9,16 @@ apply_patches() {
|
|||
}
|
||||
|
||||
pkg_scan_dir() {
|
||||
find -H "$1" -type d -printf "dir \"%p\" 0%m 0 0\\n" | tail -n +2
|
||||
find -H "$1" -type l -printf "slink \"%p\" 0%m 0 0 %l\\n"
|
||||
find -H "$1" -type f -printf "file \"%p\" 0%m 0 0\\n"
|
||||
local sp="$PKGDEPLOYDIR/$1"
|
||||
|
||||
find -H "$sp" -type d -printf "dir \"%p\" 0%m 0 0\\n" | tail -n +2 |\
|
||||
sed "s#$PKGDEPLOYDIR/##g"
|
||||
|
||||
find -H "$sp" -type l -printf "slink \"%p\" 0%m 0 0 %l\\n" |\
|
||||
sed "s#$PKGDEPLOYDIR/##g"
|
||||
|
||||
find -H "$sp" -type f -printf "file \"%p\" 0%m 0 0\\n" |\
|
||||
sed "s#$PKGDEPLOYDIR/##g"
|
||||
}
|
||||
|
||||
fetch_package() {
|
||||
|
|
Loading…
Reference in a new issue