[pitivi] bin: Add a script to source to work with xdg-app



commit c57c31665e50ced1638ca7d2e9fb3c26b025924f
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Mar 21 09:22:22 2016 +0100

    bin: Add a script to source to work with xdg-app
    
    And stop keeping build directories as we do not use that anymore and
    it just uses disk space usaless ly

 bin/pitivi-xdg-app-env      |   38 ++++++++++++++++++++++++++++++++++++++
 build/xdg-app/pitivi-bundle |    5 +++--
 2 files changed, 41 insertions(+), 2 deletions(-)
---
diff --git a/bin/pitivi-xdg-app-env b/bin/pitivi-xdg-app-env
new file mode 100755
index 0000000..b4336fa
--- /dev/null
+++ b/bin/pitivi-xdg-app-env
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+[[ "${BASH_SOURCE[0]}" == "${0}" ]] \
+    && printf "This script should not be executed but sourced lile:\n    $ source $0\n" \
+    && exit 1
+
+SCRIPTDIR=$(dirname $(realpath $_))
+export XDGAPP_ENVPATH=$(realpath $SCRIPTDIR/../../)
+export CURRENT_GST=$XDGAPP_ENVPATH
+export MYPITIVI=$XDGAPP_ENVPATH
+
+export make="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b make"
+export check="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b make check"
+export minstall="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b make install"
+export autogen="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b ./autogen.sh --prefix=/app --disable-gtk-doc"
+export configure="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b ./configure --prefix=/app --disable-gtk-doc"
+
+alias make=$make
+alias check=$check
+alias minstall=$minstall
+alias autogen=$autogen
+alias configure=$configure
+
+alias ptvenv="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b"
+alias ptivi-xdg-app="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b"
+
+echo "-> Setting up environment if needed:"
+ptvenv "echo '===> Environment ready'"
+
+for i in `ptvenv ls /app/bin/`;
+do
+    alias $i="$XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b $i"
+done
+
+alias pitivi="cd $XDGAPP_ENVPATH/pitivi && $XDGAPP_ENVPATH/pitivi/bin/pitivi-xdg-app -b bin/pitivi && cd - > 
/dev/null"
+
+export PS1="(ptv-xdgapp) $PS1"
+export PATH="$XDGAPP_ENVPATH/bin/:$PATH"
diff --git a/build/xdg-app/pitivi-bundle b/build/xdg-app/pitivi-bundle
index a235cbf..672482f 100755
--- a/build/xdg-app/pitivi-bundle
+++ b/build/xdg-app/pitivi-bundle
@@ -337,7 +337,7 @@ then
     echo "-> Removing $PREFIX"
     rm -Rf $PREFIX
 
-    XDG_APP_BUILD_OPTIONS="--keep-build-dirs"
+    XDG_APP_BUILD_OPTIONS=""
     if [ -z $BUNDLE ]
     then
       XDG_APP_BUILD_OPTIONS=" $XDG_APP_BUILD_OPTIONS --build-only"
@@ -345,7 +345,8 @@ then
 
     echo "-> Building $APPLICATION_NAME $DEVELOPMENT_BRANCHNAME from $JSON (options: $XDG_APP_BUILD_OPTIONS)"
     cd $SCRIPTDIR
-    xdg-app-builder --keep-build-dirs $XDG_APP_BUILD_OPTIONS $PREFIX $JSON || exit 1
+    echo "Building with: xdg-app-builder $XDG_APP_BUILD_OPTIONS $PREFIX $JSON"
+    xdg-app-builder $XDG_APP_BUILD_OPTIONS $PREFIX $JSON || exit 1
 
     if [ -z $BUNDLE ]
     then


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