blob: 094ec8607d90de4e4bbaffd52a3ce2bedfc64d8b [file] [log] [blame]
yang.lie3351552022-03-25 09:46:02 +08001#! /bin/bash
2#
3# Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
4#
5# SPDX-License-Identifier: MIT
6#
7
yang.li8c78ed62022-03-08 13:50:52 +08008PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 -bad"
yang.lie3351552022-03-25 09:46:02 +08009
10function read_dir(){
11 for file in `ls $1`
12 do
13 if [ -d $1"/"$file ]
14 then
15 read_dir $1"/"$file
16 else
17 if [ "${file##*.}"x = "c"x ]||[ "${file##*.}"x = "cpp"x ]||[ "${file##*.}"x = "h"x ];then
18 echo $1"/"$file
19 indent $PARAM $1"/"$file -o $1"/"$file
20 fi
21 fi
22 done
23}
24
25#excute
26read_dir ${1%*/}
27