mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Add helper function to produce a file listing from a directory
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
e8542cacc0
commit
6c24bad53b
5 changed files with 10 additions and 33 deletions
|
@ -73,13 +73,7 @@ deploy() {
|
||||||
echo "dir lib 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
echo "dir lib 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
||||||
echo "dir lib/modules 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
echo "dir lib/modules 0755 0 0" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/lib" -type d -printf "dir %p 0%m 0 0\\n" |\
|
pkg_scan_dir "$PKGDEPLOYDIR/lib" |\
|
||||||
tail -n +2 | sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/lib" -type l -printf "slink %p 0%m 0 0 %l\\n" |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/lib" -type f -printf "file %p 0%m 0 0\\n" |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/$PKGNAME.files"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -20,14 +20,6 @@ deploy() {
|
||||||
|
|
||||||
echo "dir include 0755 0 0" > "$PKGDEPLOYDIR/linux-dev.files"
|
echo "dir include 0755 0 0" > "$PKGDEPLOYDIR/linux-dev.files"
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/include" -type d -printf "dir %p 0%m 0 0\\n" |\
|
pkg_scan_dir "$PKGDEPLOYDIR/include" |\
|
||||||
tail -n +2 |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/include" -type l \
|
|
||||||
-printf "slink %p 0%m 0 0 %l\\n" |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/include" -type f -printf "file %p 0%m 0 0\\n" |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
|
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,16 +84,7 @@ deploy() {
|
||||||
echo "dir srv 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
|
echo "dir srv 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
|
||||||
echo "dir srv/www 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
|
echo "dir srv/www 0755 0 0" >> "$PKGDEPLOYDIR/nginx.files"
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/srv/www" -type d \
|
pkg_scan_dir "$PKGDEPLOYDIR/srv/www" |\
|
||||||
-printf "dir %p 0%m 0 0\\n" | tail -n +2 |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/srv/www" -type l \
|
|
||||||
-printf "slink %p 0%m 0 0 %l\\n" | \
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/srv/www" -type f \
|
|
||||||
-printf "file %p 0%m 0 0\\n" |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
|
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/nginx.files"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,7 @@ deploy() {
|
||||||
mv ${TCDIR}/${TARGET}/{include,lib} "$PKGDEPLOYDIR"
|
mv ${TCDIR}/${TARGET}/{include,lib} "$PKGDEPLOYDIR"
|
||||||
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/include/c++" -type d -printf "dir %p 0%m 0 0\\n" |\
|
pkg_scan_dir "$PKGDEPLOYDIR/include/c++" |\
|
||||||
tail -n +2 | sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/libstdc++-dev.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/include/c++" -type l -printf "slink %p 0%m 0 0 %l\\n" |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/libstdc++-dev.files"
|
|
||||||
|
|
||||||
find -H "$PKGDEPLOYDIR/include/c++" -type f -printf "file %p 0%m 0 0\\n" |\
|
|
||||||
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/libstdc++-dev.files"
|
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/libstdc++-dev.files"
|
||||||
|
|
||||||
if [ -f "$PKGDEPLOYDIR/lib/libmpx.a" ]; then
|
if [ -f "$PKGDEPLOYDIR/lib/libmpx.a" ]; then
|
||||||
|
|
|
@ -53,3 +53,9 @@ unfuck_libtool() {
|
||||||
|
|
||||||
sed -i "s#libdir='\$install_libdir'#libdir='$libdir'#g" "$PKGBUILDDIR/libtool"
|
sed -i "s#libdir='\$install_libdir'#libdir='$libdir'#g" "$PKGBUILDDIR/libtool"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue