[gnome-shell-extensions/wip/fmuellner/meson: 2/4] build: Add utility script to export zip files



commit a2c63a46d3f7ca1c9f38798f9c3b581b6fc46f11
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Apr 27 17:02:56 2017 +0200

    build: Add utility script to export zip files
    
    We currently do have some Makefile magic to export zip files suitable
    for uploading to extensions.gnome.org. As this is not easily replicated
    in meson, add a small non-magic script for the same purpose.
    
    Fixes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/31

 export-zips.sh | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
---
diff --git a/export-zips.sh b/export-zips.sh
new file mode 100755
index 0000000..776c254
--- /dev/null
+++ b/export-zips.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+srcdir=`dirname $0`
+srcdir=`(cd $srcdir && pwd)`
+
+builddir=`mktemp -p $srcdir -d _build.XXXXXX` || exit 1
+installdir=`mktemp -p $srcdir -d _install.XXXXXX` || exit 1
+
+meson setup --prefix=$installdir -Dextension_set=all $srcdir $builddir
+ninja -C$builddir install
+
+rm -rf $srcdir/zip-files
+mkdir $srcdir/zip-files
+
+extensiondir=$installdir/share/gnome-shell/extensions
+schemadir=$installdir/share/glib-2.0/schemas
+localedir=$installdir/share/locale
+
+for f in $extensiondir/*; do
+  name=`basename ${f%%@*}`
+  uuid=$name gnome-shell-extensions gcampax github com
+  schema=$schemadir/org.gnome.shell.extensions.$name.gschema.xml
+
+  cp $srcdir/NEWS $srcdir/COPYING $f
+
+  if [ -f $schema ]; then
+    mkdir $f/schemas
+    cp $schema $f/schemas;
+    glib-compile-schemas $f/schemas
+  fi
+
+  (cd $f && zip -rmq $srcdir/zip-files/$uuid.shell-extension.zip .)
+done
+
+rm -rf $builddir
+rm -rf $installdir


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]