2007-03-22 10:30:00 -07:00
|
|
|
#!/bin/bash
|
|
|
|
unpack_build () {
|
|
|
|
unpack_platform="$1"
|
|
|
|
dir_name="$2"
|
|
|
|
pkg_file="$3"
|
2007-08-22 10:23:59 -07:00
|
|
|
locale=$4
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
mkdir -p $dir_name
|
|
|
|
pushd $dir_name > /dev/null
|
|
|
|
case $unpack_platform in
|
|
|
|
mac|mac-ppc|Darwin_ppc-gcc|Darwin_Universal-gcc3)
|
|
|
|
cd ../
|
|
|
|
mkdir -p mnt
|
|
|
|
echo "mounting $pkg_file"
|
|
|
|
echo "y" | PAGER="/bin/cat" hdiutil attach -quiet -puppetstrings -noautoopen -mountpoint ./mnt "$pkg_file" > /dev/null
|
|
|
|
rsync -a ./mnt/* $dir_name/
|
|
|
|
hdiutil detach mnt > /dev/null
|
|
|
|
cd $dir_name
|
|
|
|
;;
|
|
|
|
win32|WINNT_x86-msvc)
|
|
|
|
7z x ../"$pkg_file" > /dev/null
|
2010-08-12 21:36:16 -07:00
|
|
|
if [ -d core ]
|
2007-03-22 10:30:00 -07:00
|
|
|
then
|
|
|
|
mkdir bin/
|
2010-08-12 21:36:16 -07:00
|
|
|
cp -rp core/* bin/
|
|
|
|
cp -rp optional/* bin/
|
2007-03-22 10:30:00 -07:00
|
|
|
else
|
|
|
|
for file in *.xpi
|
|
|
|
do
|
|
|
|
unzip -o $file > /dev/null
|
|
|
|
done
|
2007-08-22 10:23:59 -07:00
|
|
|
unzip -o ${locale}.xpi > /dev/null
|
2007-03-22 10:30:00 -07:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
linux-i686|linux|Linux_x86-gcc|Linux_x86-gcc3)
|
2007-11-15 07:56:57 -08:00
|
|
|
if `echo $pkg_file | grep -q "tar.gz"`
|
|
|
|
then
|
|
|
|
tar xfz ../"$pkg_file" > /dev/null
|
|
|
|
elif `echo $pkg_file | grep -q "tar.bz2"`
|
|
|
|
then
|
|
|
|
tar xfj ../"$pkg_file" > /dev/null
|
|
|
|
else
|
|
|
|
echo "Unknown package type for file: $pkg_file"
|
|
|
|
exit 1
|
|
|
|
fi
|
2007-03-22 10:30:00 -07:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
}
|