add scripts by profile name 16/70016/1 accepted/tizen/common/20160520.170821 accepted/tizen/ivi/20160520.002041 accepted/tizen/mobile/20160520.002024 accepted/tizen/tv/20160520.002037 accepted/tizen/wearable/20160520.002031 submit/tizen/20160519.014548
authorMyoungJune Park <mj2004.park@samsung.com>
Tue, 17 May 2016 23:43:43 +0000 (08:43 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Tue, 17 May 2016 23:45:53 +0000 (08:45 +0900)
- default script areas + scripts for profile(mobile, wearable, tv and
  etc)

Change-Id: Ib2bb3bc7ac2aef708d23ee2be2a4e3fec0422405
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
check.xsd
create_init_script.xsl
data/vconf-internal-setting-keys.xml

index 870522b..79c4898 100644 (file)
--- a/check.xsd
+++ b/check.xsd
@@ -17,7 +17,7 @@
                                <xs:element ref="creator" minOccurs='0' maxOccurs='1'/>
                                <xs:element ref="email" minOccurs='0' maxOccurs='1'/>
                                <xs:element ref="comment" minOccurs='0' maxOccurs='1'/>
-                               <xs:element ref="script" minOccurs='0' maxOccurs='1'/>
+                               <xs:element name="script" type="Value" minOccurs='0' maxOccurs='unbounded'/>
                                <xs:element ref="enumlist" minOccurs='0' maxOccurs='unbounded'/>
                        </xs:sequence>
                        <xs:attribute name="name" type='xs:string'/>
        <xs:element name="creator" type='xs:string'/>
        <xs:element name="email" type='xs:string'/>
        <xs:element name="comment" type='xs:string'/>
-       <xs:element name="script" type='xs:string'/>
+       <xs:element name="script">
+               <xs:complexType>
+                       <xs:attribute name="model" type='xs:string'/>
+               </xs:complexType>
+       </xs:element>
 
 
        <xs:complexType name="Value">
index 3d0763f..b6e38ca 100644 (file)
@@ -8,9 +8,12 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 </xsl:template>
 <xsl:template match="vconfkey">
 <xsl:choose>
-       <xsl:when test="./script">
-<xsl:value-of select="script"/>
+       <xsl:when test="./script[@model=$target]">
+<xsl:value-of select="script[@model=$target]"/>
   </xsl:when>
+  <xsl:otherwise>
+<xsl:value-of select="script"/>
+  </xsl:otherwise>
 </xsl:choose>
 </xsl:template>
 </xsl:stylesheet>
index 05419d4..0e122ef 100644 (file)
@@ -732,6 +732,14 @@ rm -f /etc/localtime
 ln -s /opt/etc/localtime /etc/localtime
 echo "-------------------------------------------------------------------------------------"
 ]]></script>
+       <script model="wearable">
+<![CDATA[
+echo "Do Nothing on Wearable"
+]]></script>
+       <script model="tv">
+<![CDATA[
+echo "Do Nothing on TV"
+]]></script>
   </vconfkey>
   <vconfkey type="string" name="db/setting/timezone" layer="system" readPriv="http://tizen.org/privilege/internal/default/platform" writePriv="http://tizen.org/privilege/internal/default/platform">
     <header>VCONFKEY_SETAPPL_TIMEZONE_INT</header>