Do not append studio version
[scm/meta/abs.git] / update.template
index 562973d..7ac23b4 100644 (file)
@@ -1,4 +1,4 @@
-$!/bin/bash
+#!/bin/bash
 set -x
 
 SDK_PATH=__SDK_PATH__
@@ -6,7 +6,7 @@ SDK_CMD=$SDK_PATH/tools/ide/bin/tizen
 SHARE_ROOT=__SHARE_ROOT__
 TOOL_PATH=__TOOL_PATH__
 WRAPPER_PATH=__WRAPPER_PATH__
-PROFILE=__PROFILE__
+PROFILE="__PROFILE__"
 PACKAGE_SERVER=__PACKAGE_SERVER__
 ABS_CMD=/home/build/abs
 TOOL_CMD=/home/build/sdk-build/pkg-cli
@@ -31,7 +31,9 @@ if [ -f $UPDATER ]; then
   IFS=' ' read -r -a snapshot <<< ${mylist}
   if [ ! -z ${snapshot[0]} ]; then
     su - build -c "$UPDATER install WebCLI -r $PACKAGE_SERVER -d tizen_3.0 -s ${snapshot[0]} --remove-installed-sdk"
-    su - build -c "$UPDATER install `echo "$PROFILE" | awk '{print toupper($0)}'`-3.0-NativeAppDevelopment-CLI -s ${snapshot[0]} --accept-license --remove-installed-sdk"
+    for pf in $PROFILE; do
+      su - build -c "$UPDATER install `echo "$pf" | awk '{print toupper($0)}'`-3.0-NativeAppDevelopment-CLI -s ${snapshot[0]} --accept-license --remove-installed-sdk"
+    done
   fi
 else
   UPDATER="$SDK_PATH/package-manager/package-manager-cli.bin"
@@ -41,18 +43,14 @@ fi
 su - build -c "tizen list rootstrap"
 su - build -c "tizen version"
 
-if [ $PROFILE == "unified" ]; then
-  rm -rf $SDK_PATH/tools/smart-build-interface/plugins/mobile-*.xml
-  rm -rf $SDK_PATH/platforms/tizen-3.0/mobile/rootstraps/
-  rm -rf $SDK_PATH/platforms/tizen-4.0/mobile/rootstraps/
-  rm -rf $SDK_PATH/tools/smart-build-interface/plugins/wearable-*.xml
-  rm -rf $SDK_PATH/platforms/tizen-3.0/wearable/rootstraps/
-  rm -rf $SDK_PATH/platforms/tizen-4.0/wearable/rootstraps/
-else
-  rm -rf $SDK_PATH/tools/smart-build-interface/plugins/${PROFILE}-*.xml
-  rm -rf $SDK_PATH/platforms/tizen-3.0/$PROFILE/rootstraps/
-  rm -rf $SDK_PATH/platforms/tizen-4.0/$PROFILE/rootstraps/
-fi
+for pf in $PROFILE; do
+  rm -rf $SDK_PATH/tools/smart-build-interface/plugins/${pf}-*.xml || true
+  for tv in `ls $SDK_PATH/platforms/`; do
+    rm -rf $SDK_PATH/platforms/${tv}/$pf/rootstraps/ || true
+  done
+done
+
+rm -rf $SDK_PATH/.info/*private*
 
 wget --no-proxy -P $SHARE_ROOT/ -r -nd -np -R index.html* ${ROOTSTRAP_URL}/ &> /dev/null