Automatic SBS_HOME detection for util making and installer. wip
authortimothy.murphy@nokia.com
Wed, 18 Nov 2009 21:50:36 +0000
branchwip
changeset 8 34d87ffcc373
parent 7 f9fd2a994239
child 9 b211d87c390a
child 11 ea23b18a2ff6
Automatic SBS_HOME detection for util making and installer. It's a little more user-friendly for anyone who wants to build a linux install packager.
sbsv2/raptor/util/Makefile
sbsv2/raptor/util/install-linux/package_sbs.sh
--- a/sbsv2/raptor/util/Makefile	Mon Nov 16 21:19:12 2009 +0000
+++ b/sbsv2/raptor/util/Makefile	Wed Nov 18 21:50:36 2009 +0000
@@ -17,6 +17,13 @@
 
 SHELL:=bash
 
+
+SBS_HOME=$(abspath $(dir $(word 1,$(MAKEFILE_LIST)))/..)
+export SBS_HOME
+
+$(info SBS_HOME=$(SBS_HOME))
+
+
 .PHONY:: all
 all::
 
--- a/sbsv2/raptor/util/install-linux/package_sbs.sh	Mon Nov 16 21:19:12 2009 +0000
+++ b/sbsv2/raptor/util/install-linux/package_sbs.sh	Wed Nov 18 21:50:36 2009 +0000
@@ -25,8 +25,17 @@
 packtype=source
 fi
 
+
 echo "Raptor packager for Linux"
-export PACKAGER_HOME="$PWD"
+
+
+# Calculate SBS_HOME from where this script is started
+temp=$0
+SBS_HOME=$(cd ${temp%/*} && echo $PWD)
+export SBS_HOME=${SBS_HOME%/util/install-linux}
+
+
+export PACKAGER_HOME="$SBS_HOME/util/install-linux"
 
 echo "SBS_HOME is $SBS_HOME - this is the version that will be packaged."