diff options
author | 2020-11-20 23:36:23 +0900 | |
---|---|---|
committer | 2020-11-22 09:02:55 +0900 | |
commit | 17cf21bcf8a2e29d2cbcf0a313474d2a4ee44f5d (patch) | |
tree | 582a9768558d9eaf261ca5df6136e9de54c95816 /systemservice/config/library/system_manager_config/xml/launch_cfg2xml.sh | |
parent | 9e86046cdb356913ae026f616e5bf17f6f238aa5 (diff) |
Re-organized sub-directory by category
Since all the sub-directories were placed in the
first level, created sub-directories, "hal", "module",
and "service" for classification and relocated each component.
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Change-Id: Ifdf743ac0d1893bd8e445455cf0d2c199a011d5c
Diffstat (limited to 'systemservice/config/library/system_manager_config/xml/launch_cfg2xml.sh')
-rwxr-xr-x | systemservice/config/library/system_manager_config/xml/launch_cfg2xml.sh | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/systemservice/config/library/system_manager_config/xml/launch_cfg2xml.sh b/systemservice/config/library/system_manager_config/xml/launch_cfg2xml.sh deleted file mode 100755 index 57b6ee2..0000000 --- a/systemservice/config/library/system_manager_config/xml/launch_cfg2xml.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# -# Copyright (c) 2019-2020 TOYOTA MOTOR CORPORATION -# -# 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. -# - -export infile=$1 -export g_group=1 - -if ! [[ "$infile" =~ .+\.cfg ]] ;then - echo "$infile is not *.cfg" - exit 1 -elif ! [ -e $infile ];then - echo "$infile not found" - exit 1 -fi - -#GROUP extraction -cat ${infile} | while read line -do - if ! [[ "${line}" =~ ^[#\[] ]]; then #Remove first #[ - echo $line | sed 's/Launch[0-9]\+=//g' | cut -d '|' -f1-4 - fi -done | uniq | while read line -do - echo "<!-- group_id=$g_group -->" - echo "<group name=\"`echo $line | cut -d '|' -f1`\" wait_time=\"`echo $line | cut -d '|' -f3`\" trigger=\"`echo $line | cut -d '|' -f4`\" >" - - cat ${infile} | while read line - do - if ! [[ "${line}" =~ ^[#\[] ]]; then #Remove first #[ - l_group=`echo $line | sed 's/Launch[0-9]\+=//g' | cut -d '|' -f2` - - #Extract only LAUNCH applicable to g_group - if [ ${l_group} = ${g_group} ]; then - echo $line | sed 's/Launch[0-9]\+=//g' | cut -d '|' -f5- - fi - fi - done | while read line - do - echo " <launch " - echo " name=\"`echo $line | cut -d '|' -f1`\" path=\"`echo $line | cut -d '|' -f2`\" priority=\"`echo $line | cut -d '|' -f3`\"" - echo " critical=\"`echo $line | cut -d '|' -f4`\" retry_cnt=\"`echo $line | cut -d '|' -f5`\" arguments=\"`echo $line | cut -d '|' -f6`\"" - echo " logging_mask=\"`echo $line | cut -d '|' -f7`\" restart=\"`echo $line | cut -d '|' -f8`\" is_start_required=\"`echo $line | cut -d '|' -f9`\"" - echo " shutdown_critical=\"`echo $line | cut -d '|' -f10`\" shutdown_wait_time=\"`echo $line | cut -d '|' -f11`\" fast_shutdown_wait_time=\"`echo $line | cut -d '|' -f12`\"" - echo " user_name=\"`echo $line | cut -d '|' -f13`\"" - echo " />" - done - - echo "</group>" - - g_group=$(($g_group + 1)) -done - - - - |