aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mobilecomponents.sh
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-08 09:55:32 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-08 09:55:32 -0800
commitc496d5fa05a9921515e2cbf840d5df39d027b2ed (patch)
treec2cd071d295435c8813dcb3d6de16051f263c723 /scripts/mobilecomponents.sh
parenta13fa83046aa2b7733fedbb83b5441090be042a9 (diff)
downloadsubsurface-c496d5fa05a9921515e2cbf840d5df39d027b2ed.tar.gz
Add helper script to pull Plasma Mobile Components and icons
Normally this is done in the build.sh script when building Subsurface-mobile - but some people might have set up their build enviroment differently and for them this allows to pull (and update) these components from upstream without having to run build.sh Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/mobilecomponents.sh')
-rwxr-xr-xscripts/mobilecomponents.sh55
1 files changed, 55 insertions, 0 deletions
diff --git a/scripts/mobilecomponents.sh b/scripts/mobilecomponents.sh
new file mode 100755
index 000000000..39bfa5262
--- /dev/null
+++ b/scripts/mobilecomponents.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+#
+# if you run the build.sh script to build Subsurface you'll never need
+# this, but if you build your binaries differently for some reason and
+# you want to build Subsurface-mobile, running this from within the
+# checked out source directory (not your build directory) should do the
+# trick - you can also run this to update to the latest upstream when
+# you don't want to rerun the whole build.sh script.
+
+SRC=$(cd .. ; pwd)
+
+if [ ! -d "$SRC/subsurface" ] || [ ! -d "qt-mobile" ] || [ ! -d "subsurface-core" ] ; then
+ echo "please start this script from the Subsurface source directory (which needs to be named \"subsurface\")."
+ exit 1
+fi
+
+# now bring in the latest Plasma-mobile mobile components plus a couple of icons that we need
+# first, get the latest from upstream
+# yes, this is a bit overkill as we clone a lot of stuff for just a few files, but this way
+# we stop having to manually merge our code with upstream all the time
+# as we get closer to shipping a production version we'll likely check out specific tags
+# or SHAs from upstream
+cd $SRC
+if [ ! -d plasma-mobile ] ; then
+ git clone git://github.com/KDE/plasma-mobile
+fi
+pushd plasma-mobile
+git pull
+popd
+if [ ! -d breeze-icons ] ; then
+ git clone git://anongit.kde.org/breeze-icons
+fi
+pushd breeze-icons
+git pull
+popd
+
+# now copy the components and a couple of icons into plae
+MC=$SRC/subsurface/qt-mobile/qml/mobilecomponents
+PMMC=plasma-mobile/components/mobilecomponents
+BREEZE=breeze-icons
+
+rm -rf $MC
+mkdir -p $MC/icons
+cp -R $PMMC/qml/* $MC/
+cp $PMMC/fallbacktheme/*qml $MC/
+
+cp $BREEZE/icons/actions/24/dialog-cancel.svg $MC/icons
+cp $BREEZE/icons/actions/24/distribute-horizontal-x.svg $MC/icons
+cp $BREEZE/icons/actions/24/document-edit.svg $MC/icons
+cp $BREEZE/icons/actions/24/document-save.svg $MC/icons
+cp $BREEZE/icons/actions/24/go-next.svg $MC/icons
+cp $BREEZE/icons/actions/24/go-previous.svg $MC/icons
+cp $BREEZE/icons/actions/16/view-readermode.svg $MC/icons
+
+echo org.kde.plasma.mobilecomponents synced from upstream