pjs/mstone/ospkg.sh

73 строки
2.1 KiB
Bash
Исходник Обычный вид История

2000-03-28 05:22:46 +04:00
#!/bin/sh
# package an OS into a multi-OS tree
# usage ospkg.sh targetOS os...
target=$1; shift
pkgdir=./build/package/$target/mstone
errors=0
for obj
do
srcdir=./build/package/$obj/mstone
if [ ! -d $srcdir ] ; then
echo "Error! Source directory $srcdir is missing."
errors=1
continue;
fi
arch=`echo $obj | sed -e 's/_OPT.OBJ//' | sed -e 's/_DBG.OBJ//'`
echo "===== adding $arch packaging to $pkgdir"
echo "Installing mailclient"
[ -d $pkgdir/bin/$arch/bin ] || mkdir -p $pkgdir/bin/$arch/bin
cp -p $srcdir/bin/mailclient $pkgdir/bin/$arch/bin/
if [ -d $srcdir/gd ] ; then
echo "Installing gd"
[ -d $pkgdir/bin/$arch/gd ] || mkdir -p $pkgdir/bin/$arch/gd
cp -p $srcdir/gd/* $pkgdir/bin/$arch/gd/
fi
if [ -d $srcdir/gnuplot ] ; then
echo "Installing gnuplot"
[ -d $pkgdir/bin/$arch/gnuplot ] || mkdir -p $pkgdir/bin/$arch/gnuplot
cp -p $srcdir/gnuplot/* $pkgdir/bin/$arch/gnuplot/
fi
if [ -d $srcdir/perl ] ; then
perlver=`cd $srcdir/perl/lib; ls -d 5.* | head -1`
perlarch=`cd $srcdir/perl/lib/$perlver; ls -d */Config.pm | cut -f1 -d/`
echo "Installing perl $perlver for $perlarch"
[ -d $pkgdir/perl ] || mkdir -p $pkgdir/perl
cp -pf $srcdir/perl/Artistic $pkgdir/perl/
2000-03-29 06:07:05 +04:00
# we dont pull everything in, just the potentially useful parts
2000-03-28 05:22:46 +04:00
for subdir in man/man1 \
lib/$perlver lib/$perlver/$perlarch \
2000-03-29 06:07:05 +04:00
lib/$perlver/Time lib/$perlver/Term lib/$perlver/Class \
lib/$perlver/Sys lib/$perlver/Data lib/$perlver/Getopt \
lib/$perlver/Test lib/$perlver/Text \
2000-03-28 05:22:46 +04:00
lib/$perlver/File lib/$perlver/File/Spec \
lib/$perlver/CGI lib/$perlver/Net \
lib/$perlver/$perlarch/auto/DynaLoader \
lib/$perlver/$perlarch/auto/Socket \
lib/$perlver/$perlarch/auto/re \
2000-03-29 06:07:05 +04:00
lib/$perlver/$perlarch/auto/attrs
2000-03-28 05:22:46 +04:00
do
[ -d $srcdir/perl/$subdir ] || continue;
[ -d $pkgdir/perl/$subdir ] || mkdir -p $pkgdir/perl/$subdir
# HACK: all the files have dots in them, directories dont
cp -pf $srcdir/perl/$subdir/*.* $pkgdir/perl/$subdir
done
2000-03-29 06:07:05 +04:00
# where we put multi-os perl binaries
2000-03-28 05:22:46 +04:00
perlbin=$pkgdir/perl/arch/$arch
[ -d $perlbin ] || mkdir -p $perlbin
cp -p $srcdir/perl/bin/* $perlbin/
fi
done
exit $errors