2016-01-09 03:32:05 +00:00
|
|
|
#!/bin/bash
|
2017-12-25 18:51:57 +00:00
|
|
|
# Copyright 2015-2017 Kevin Kofler <Kevin@tigcc.ticalc.org>
|
2016-01-09 03:32:05 +00:00
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
# a copy of this software and associated documentation files (the
|
|
|
|
# "Software"), to deal in the Software without restriction, including
|
|
|
|
# without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
# permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
# the following conditions:
|
|
|
|
#
|
|
|
|
# The above copyright notice and this permission notice shall be included
|
|
|
|
# in all copies or substantial portions of the Software.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
|
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
|
|
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
if [ -z "$1" ] ; then
|
|
|
|
echo "usage: ./clean_qtwebengine.sh VERSION"
|
2024-02-01 18:35:05 +00:00
|
|
|
echo "e.g.: ./clean_qtwebengine.sh 5.15.16"
|
2016-01-09 03:32:05 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-12-25 18:51:57 +00:00
|
|
|
DIRNAME="qtwebengine-everywhere-src-$1"
|
2016-01-09 03:32:05 +00:00
|
|
|
|
|
|
|
echo "removing $DIRNAME"
|
|
|
|
rm -rf "$DIRNAME" || exit $?
|
|
|
|
|
|
|
|
if [ -f "$DIRNAME.tar.xz" ] ; then
|
|
|
|
echo "unpacking $DIRNAME.tar.xz"
|
2020-03-26 12:22:11 +00:00
|
|
|
XZ_OPT="-T 4" tar xJf "$DIRNAME.tar.xz" || exit $?
|
2016-01-09 03:32:05 +00:00
|
|
|
elif [ -f "$DIRNAME.tar.bz2" ] ; then
|
|
|
|
echo "unpacking $DIRNAME.tar.bz2"
|
|
|
|
tar xjf "$DIRNAME.tar.bz2" || exit $?
|
|
|
|
elif [ -f "$DIRNAME.tar.gz" ] ; then
|
|
|
|
echo "unpacking $DIRNAME.tar.gz"
|
|
|
|
tar xzf "$DIRNAME.tar.gz" || exit $?
|
|
|
|
elif [ -f "$DIRNAME.7z" ] ; then
|
|
|
|
echo "unpacking $DIRNAME.7z"
|
|
|
|
if type 7za >/dev/null 2>/dev/null ; then
|
|
|
|
7za x "$DIRNAME.7z" || exit $?
|
|
|
|
elif type 7z >/dev/null 2>/dev/null ; then
|
|
|
|
7z x "$DIRNAME.7z" || exit $?
|
|
|
|
else
|
|
|
|
echo "error: p7zip required"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "error: no archive for $DIRNAME found"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "running clean_ffmpeg.sh"
|
2016-07-16 23:38:49 +00:00
|
|
|
./clean_ffmpeg.sh "$DIRNAME/src/3rdparty/chromium" || exit $?
|
2016-01-09 03:32:05 +00:00
|
|
|
|
2016-12-03 19:25:56 +00:00
|
|
|
echo "ripping out openh264 sources"
|
|
|
|
rm -rf "$DIRNAME/src/3rdparty/chromium/third_party/openh264/src" || exit $?
|
|
|
|
|
2016-01-09 03:32:05 +00:00
|
|
|
echo "repacking as $DIRNAME-clean.tar.xz"
|
2022-01-18 20:31:59 +00:00
|
|
|
XZ_OPT="-8 -T 2" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $?
|
2016-01-09 03:32:05 +00:00
|
|
|
|
|
|
|
echo "removing $DIRNAME"
|
|
|
|
rm -rf "$DIRNAME" || exit $?
|
|
|
|
|
|
|
|
echo "done"
|
|
|
|
exit 0
|