2006-07-29 01:00:11 +04:00
|
|
|
#!/bin/bash
|
2012-05-21 15:12:37 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2006-07-29 01:00:11 +04:00
|
|
|
unpack_build () {
|
2006-08-25 00:24:17 +04:00
|
|
|
unpack_platform="$1"
|
2006-07-29 01:00:11 +04:00
|
|
|
dir_name="$2"
|
|
|
|
pkg_file="$3"
|
2007-08-22 21:23:59 +04:00
|
|
|
locale=$4
|
2006-07-29 01:00:11 +04:00
|
|
|
|
|
|
|
mkdir -p $dir_name
|
|
|
|
pushd $dir_name > /dev/null
|
2006-08-25 00:24:17 +04:00
|
|
|
case $unpack_platform in
|
2006-11-14 00:12:11 +03:00
|
|
|
mac|mac-ppc|Darwin_ppc-gcc|Darwin_Universal-gcc3)
|
2006-07-29 01:00:11 +04:00
|
|
|
cd ../
|
|
|
|
mkdir -p mnt
|
2006-11-14 00:12:11 +03:00
|
|
|
echo "mounting $pkg_file"
|
2006-09-26 03:12:46 +04:00
|
|
|
echo "y" | PAGER="/bin/cat" hdiutil attach -quiet -puppetstrings -noautoopen -mountpoint ./mnt "$pkg_file" > /dev/null
|
2006-07-29 01:00:11 +04:00
|
|
|
rsync -a ./mnt/* $dir_name/
|
2006-08-02 01:47:09 +04:00
|
|
|
hdiutil detach mnt > /dev/null
|
2006-07-29 01:00:11 +04:00
|
|
|
cd $dir_name
|
|
|
|
;;
|
2006-11-14 00:12:11 +03:00
|
|
|
win32|WINNT_x86-msvc)
|
2007-03-03 02:53:55 +03:00
|
|
|
7z x ../"$pkg_file" > /dev/null
|
2010-08-13 08:36:16 +04:00
|
|
|
if [ -d core ]
|
2006-10-06 09:25:50 +04:00
|
|
|
then
|
|
|
|
mkdir bin/
|
2010-08-13 08:36:16 +04:00
|
|
|
cp -rp core/* bin/
|
|
|
|
cp -rp optional/* bin/
|
2006-10-06 09:25:50 +04:00
|
|
|
else
|
|
|
|
for file in *.xpi
|
|
|
|
do
|
2006-07-29 01:00:11 +04:00
|
|
|
unzip -o $file > /dev/null
|
2006-10-06 09:25:50 +04:00
|
|
|
done
|
2007-08-22 21:23:59 +04:00
|
|
|
unzip -o ${locale}.xpi > /dev/null
|
2006-10-06 09:25:50 +04:00
|
|
|
fi
|
2006-07-29 01:00:11 +04:00
|
|
|
;;
|
2006-11-14 00:12:11 +03:00
|
|
|
linux-i686|linux|Linux_x86-gcc|Linux_x86-gcc3)
|
2007-11-15 18:56:57 +03: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
|
2006-07-29 01:00:11 +04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
}
|