mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
36 lines
789 B
Bash
36 lines
789 B
Bash
|
#!/bin/bash
|
||
|
unpack_build () {
|
||
|
platform="$1"
|
||
|
dir_name="$2"
|
||
|
pkg_file="$3"
|
||
|
|
||
|
mkdir -p $dir_name
|
||
|
pushd $dir_name > /dev/null
|
||
|
case $platform in
|
||
|
mac|mac-ppc)
|
||
|
cd ../
|
||
|
mkdir -p mnt
|
||
|
echo "y" | PAGER="cat > /dev/null" hdiutil attach \
|
||
|
-quiet -mountpoint ./mnt "$pkg_file"
|
||
|
sleep 5
|
||
|
rsync -a ./mnt/* $dir_name/
|
||
|
hdiutil detach mnt
|
||
|
cd $dir_name
|
||
|
;;
|
||
|
win32)
|
||
|
/usr/local/bin/7za x ../"$pkg_file" > /dev/null
|
||
|
for file in *.xpi
|
||
|
do
|
||
|
unzip -o $file > /dev/null
|
||
|
done
|
||
|
|
||
|
;;
|
||
|
linux)
|
||
|
tar xfvz ../"$pkg_file" > /dev/null
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
popd > /dev/null
|
||
|
|
||
|
}
|