[gitg] Add shell script



commit 6e168a1c87fab5a3d144ea4c1dda9036907e1b8b
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Wed Dec 30 13:07:55 2015 +0100

    Add shell script

 osx/scripts/brew.rb |   18 ++++++++++++++++++
 osx/scripts/shell   |    7 +++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/osx/scripts/brew.rb b/osx/scripts/brew.rb
index e86267e..52530c5 100755
--- a/osx/scripts/brew.rb
+++ b/osx/scripts/brew.rb
@@ -53,6 +53,24 @@ module Superenv
 
     "#{cpu} -mmacosx-version-min=#{OS::Mac::version}"
   end
+
+  alias_method :orig_setup_build_environment, :setup_build_environment
+
+  def setup_build_environment(formula=nil)
+    if self["GITG_SHELL"]
+      orig_setup_build_environment(formula || Formulary.factory("gnome/gitg/gitg"))
+
+      prepend_path "PATH", self["HOME"] + "/.local/bin"
+
+      self["PS1_EXTRA"] = "\\[\\033[0;35m\\](gitg-brew)\\[\\033[0m\\] "
+      self["XDG_DATA_DIRS"] = self["HOMEBREW_PREFIX"] + "/share"
+
+      prepend_path "PKG_CONFIG_PATH", self["HOMEBREW_PREFIX"] + "/lib/pkgconfig"
+      prepend_path "PKG_CONFIG_PATH", self["HOMEBREW_PREFIX"] + "/share/pkgconfig"
+    else
+      orig_setup_build_environment(formula)
+    end
+  end
 end
 
 load(G_ORIG_BREW_RB)
diff --git a/osx/scripts/shell b/osx/scripts/shell
new file mode 100755
index 0000000..249247e
--- /dev/null
+++ b/osx/scripts/shell
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+. $(dirname "$0")/env
+
+export GITG_SHELL=1
+
+exec "$lbrew" sh


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