blob: 434549ac4d7c64066891eb381a9049d35f7c84b3 [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
8PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
9
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