#!/usr/bin/ruby =begin pkg-clean Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. Contact: Taejun Ha Jiil Hyoun Donghyuk Yang DongHee Yang Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Contributors: - S-Core Co., Ltd =end $LOAD_PATH.unshift File.dirname(__FILE__)+"/src/common" $LOAD_PATH.unshift File.dirname(__FILE__)+"/src/pkg_server" $LOAD_PATH.unshift File.dirname(__FILE__)+"/src/builder" require "utils" require "packageServer" require "Builder" require "CleanOptionParser" path = Dir.pwd if not File.exist? "package" then puts "current dirctory \"#{path}\" is not package root directory" exit 1 end option = parse #generate server when local package server is not set begin builder = Builder.get("default") rescue puts "Default builder does not exist! Creating new builder..." builder = Builder.create("default", "http://172.21.111.132/pkgserver/unstable",nil) end #build project if not builder.clean( Utils::WORKING_DIR ) then puts "Clean failed!" else puts "Clean succeeded!" end