build_dist.sh000075500000000000000000000032321076311134100135320ustar00rootroot00000000000000#!/bin/sh -e # # $Id: build_dist.sh,v 1.0 2004/03/07 17:53:42 legion Exp $ # indexfile="${indexfile:=./thunderbird-content-index}" # Generation target directories top_dir="${top_dir:=./dist}" dist_bindir="${top_dir}/bin" dist_includedir="${top_dir}/include" dist_idldir="${top_dir}/idl" # Real directories real_bindir="${real_bindir:=/usr/lib/thunderbird}" real_includedir="${real_includedir:=/usr/include/thunderbird}" real_idldir="${real_idldir:=/usr/share/idl/thunderbird}" # Make top build dir [ -d "$top_dir" ] || mkdir "$top_dir" # Make target directories [ -d "$dist_bindir" ] || mkdir "$dist_bindir" [ -d "$dist_idldir" ] || mkdir "$dist_idldir" [ -d "$dist_includedir" ] || mkdir "$dist_includedir" make_link() { distdir="$1"; realdir="$2"; f="$3" d="${f%/*}" [ ! -e "${distdir}/${d}" -a -n "$d" -a -d "${realdir}/${d}" ] && mkdir -p "${distdir}/${d}" [ ! -e "${distdir}/${f}" -a -f "${realdir}/${f}" ] && ln -s "${realdir}/${f}" "${distdir}/${f}" } [ -f "$indexfile" ] || { echo "$indexfile: not found">&2; exit 1; } while read f; do case "$f" in $real_bindir/*) make_link "${dist_bindir}" "${real_bindir}" "${f##$real_bindir/}" ||: ;; $real_includedir/*) make_link "${dist_includedir}" "${real_includedir}" "${f##$real_includedir/}" ||: ;; $real_idldir/*) make_link "${dist_idldir}" "${real_idldir}" "${f##$real_idldir/}" ||: ;; *) echo "Ignore: $f" ;; esac done < "$indexfile" # Extensions may want to write at follow files. rm -f "$dist_bindir/chrome/installed-chrome.txt" "$dist_bindir/chrome/chromelist.txt" touch "$dist_bindir/chrome/installed-chrome.txt" "$dist_bindir/chrome/chromelist.txt" exit 0 find_install.sh000075500000000000000000000004161076311134100140570ustar00rootroot00000000000000#!/bin/sh dist=$1 exclude=$2 dist=${dist:=dist} exclude=${exclude:=/usr} for f in $(find $dist); do real_file=$(readlink $f) real_file=$( echo $real_file | sed -e "s@$exclude.*@@g" ) [ -L $f -o -d $f ] || echo $f [ -z "$real_file" ] || echo $f done makemake.sh000075500000000000000000000012751076311134100131700ustar00rootroot00000000000000#!/bin/sh # makemake: Dumb script to make Makefile from Makefile.in # (recursively, if -r is specified) # Usage: makemake [-r] if [ $# -eq 0 ]; then makelist=./Makefile.in else makelist=$(find . -name Makefile.in -print) fi for makefile in $makelist; do dir=${makefile%/*} pushd $dir wd=$(pwd) echo $wd top_srcdir="" while [ "x$wd" != "x" -a "${wd##*/}" != "mozilla" ]; do if [ "x$top_srcdir" == "x" ]; then top_srcdir=".." else top_srcdir="../$top_srcdir" fi wd=${wd%/*} done /bin/cp Makefile.in Makefile ex -s Makefile << /EOF set nomagic g%@srcdir@%s%@srcdir@%.%gp g%@top_srcdir@%s%@top_srcdir@%${top_srcdir}%gp wq /EOF popd done