qt5-qtwebengine/clean_qtwebengine.sh

71 lines
2.4 KiB
Bash
Raw Normal View History

2016-01-09 03:32:05 +00:00
#!/bin/bash
# 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"
2022-01-18 20:31:59 +00:00
echo "e.g.: ./clean_qtwebengine.sh 5.15.8"
2016-01-09 03:32:05 +00:00
exit 1
fi
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"
./clean_ffmpeg.sh "$DIRNAME/src/3rdparty/chromium" || exit $?
2016-01-09 03:32:05 +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