[pitivi] flatpak: Fix detection of script running as installer
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] flatpak: Fix detection of script running as installer
- Date: Sat, 16 Jul 2016 09:16:03 +0000 (UTC)
commit cb1d8ac499a80e0eb7c2aacdcdaa6c352279dd8e
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Jul 16 11:05:00 2016 +0200
flatpak: Fix detection of script running as installer
The INSTALLER variable was used in one place which was before it was
being set.
build/flatpak/pitivi-flatpak | 80 +++++++++++++++++++++---------------------
1 files changed, 40 insertions(+), 40 deletions(-)
---
diff --git a/build/flatpak/pitivi-flatpak b/build/flatpak/pitivi-flatpak
index 8915096..d983573 100755
--- a/build/flatpak/pitivi-flatpak
+++ b/build/flatpak/pitivi-flatpak
@@ -44,46 +44,6 @@ GST_VERSION=master
# ------------------------------------------- #
-flatpak remote-add --help | grep "\-\-from" > /dev/null 2>&1
-if [ ! $? -eq 0 ]
-then
- printf "$RED \nYou need to install flatpak >= 0.6.4 to be able to use the '$0' script.
-
-You can find some informations about how to install it for your distribution at:
-
-* http://flatpak.org/ $NC\n\n\n"
-
- if [ -n "$INSTALLER" ]
- then
- printf "\n\nYou can now exit that terminal."
- read
- fi
- exit 1
-fi
-
-# ------------------------------------------- #
-
-# Computation of actual variable values
-APPLICATION_REPO_NAME=`flatpak remote-list --user -d | grep "$APPLICATION_FLATPAK_REPO" | awk '{ print $1 }'`
-flatpak remote-list --user | grep $APPLICATION_DEFAULT_REPO_NAME > /dev/null 2>&1
-res=$?
-# Update remote URL if needed
-if [ $res != 0 ] && [ -n "$APPLICATION_REPO_NAME" ]
-then
- echo "-> Setting $APPLICATION_DEFAULT_REPO_NAME URL to $APPLICATION_FLATPAK_REPO"
- flatpak remote-modify --user $APPLICATION_DEFAULT_REPO_NAME --url=$APPLICATION_FLATPAK_REPO
-fi
-
-APPLICATION_REPO_NAME=${APPLICATION_REPO_NAME:-$APPLICATION_DEFAULT_REPO_NAME}
-SCRIPTDIR="$( cd "$( dirname "$(readlink -f ${BASH_SOURCE[0]})" )" && pwd )"
-
-SDK_REPO_NAME=`flatpak remote-list --user -d | grep "$SDK_REPO" | awk '{ print $1 }'`
-SDK_REPO_NAME=${SDK_REPO_NAME:-$SDK_DEFAULT_REPO_NAME}
-
-REPO=$FLATPAK_ENVPATH/flatpak-repos/$APPLICATION_NAME
-
-# ------------------------------------------- #
-
# Some terminal output color values
RED='\033[0;31m'
GREEN='\033[0;32m'
@@ -196,6 +156,46 @@ then
exit 0
fi
+# ------------------------------------------- #
+
+flatpak remote-add --help | grep "\-\-from" > /dev/null 2>&1
+if [ ! $? -eq 0 ]
+then
+ printf "$RED \nYou need to install flatpak >= 0.6.4 to be able to use the '$0' script.
+
+You can find some informations about how to install it for your distribution at:
+
+* http://flatpak.org/ $NC\n\n\n"
+
+ if [ -n "$INSTALLER" ]
+ then
+ printf "\n\nYou can now exit that terminal."
+ read
+ fi
+ exit 1
+fi
+
+# ------------------------------------------- #
+
+# Computation of actual variable values
+APPLICATION_REPO_NAME=`flatpak remote-list --user -d | grep "$APPLICATION_FLATPAK_REPO" | awk '{ print $1 }'`
+flatpak remote-list --user | grep $APPLICATION_DEFAULT_REPO_NAME > /dev/null 2>&1
+res=$?
+# Update remote URL if needed
+if [ $res != 0 ] && [ -n "$APPLICATION_REPO_NAME" ]
+then
+ echo "-> Setting $APPLICATION_DEFAULT_REPO_NAME URL to $APPLICATION_FLATPAK_REPO"
+ flatpak remote-modify --user $APPLICATION_DEFAULT_REPO_NAME --url=$APPLICATION_FLATPAK_REPO
+fi
+
+APPLICATION_REPO_NAME=${APPLICATION_REPO_NAME:-$APPLICATION_DEFAULT_REPO_NAME}
+SCRIPTDIR="$( cd "$( dirname "$(readlink -f ${BASH_SOURCE[0]})" )" && pwd )"
+
+SDK_REPO_NAME=`flatpak remote-list --user -d | grep "$SDK_REPO" | awk '{ print $1 }'`
+SDK_REPO_NAME=${SDK_REPO_NAME:-$SDK_DEFAULT_REPO_NAME}
+
+REPO=$FLATPAK_ENVPATH/flatpak-repos/$APPLICATION_NAME
+
SDK_INSTALLED=`flatpak list --runtime -d | grep "$SDK_NAME/.*/$SDK_VERSION"`
SDK_LOCAL_INSTALLED=`flatpak list --runtime -d | grep "$SDK_NAME.Locale/.*/$SDK_VERSION"`
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]