First shell script-lint check and report collection

Source: Internet
Author: User
Tags mkdir
function

If you do not need to develop and modify the Android project configuration file, perform Android lint check, after the inspection, the inspection results under each AAR package from the remote machine copy to the node machine. Source Code

#!/bin/sh #用于Android Lint Review Project, copy the lint file from the build task to the current job #从pmo机器中将所有的build文件保存到本地机器上来 #lint文件所在的根目录 work_dir=$1 # Need to move to target directory target_dir=$2 echo "Lint source directory:" + $work _dir echo "Lint will be moved to the directory:" + $target _dir echo "===========================
  =start============= "# Empty result directory Delete_report_dir () {if [!-D $target _dir/report];then mkdir $target _dir/report fi for Dir2del in $target _dir/report/*; do if [-D $dir 2del]; Then RM-RF $dir 2del fi do} echo "================delete_report_dir_end============" #移动文件到报告目录 Move_dir_lint_ File () {currendir=$1 for i in ' Find $currenDir ';d o if [["${i##*/}" =~ "Lint-results"]];then dir_file= $targ  et_dir/report/${currendir##*/} # echo "Destination directory" + $dir _file # echo "Target file:" + $i mkdir-p $dir _file CP -RF $i $dir _file fi do} echo "================move_dir_lint_file============" List_alldir () {for file2 in ' Ls-a $work _dir ' do if [x ' $file 2 "! = X". "-A X" $file 2 "! = X": "];
 Then           If [-d ' $work _dir/$file 2 "];then echo" $work _dir/$file 2 "Move_dir_lint_file $w ork_dir/$file 2 fi fi Done} echo "================list_alldir_end============"
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.