mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-20 21:43:41 +00:00
Clean up
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
root=$(pwd)
|
||||
source="$root"/src
|
||||
|
||||
function format() {
|
||||
filelist=$(ls "$1")
|
||||
pushd "$1"
|
||||
for file in $filelist; do
|
||||
if test -d "$file"; then
|
||||
echo "format directory $file"
|
||||
format "$file"
|
||||
else
|
||||
if ([ "${file%%.*}" != "base64" ] &&
|
||||
[ "${file%%.*}" != "json" ] &&
|
||||
[ "${file%%.*}" != "uthash" ]) &&
|
||||
([ "${file##*.}" = "h" ] || [ "${file##*.}" = "c" ]); then
|
||||
echo "format file $file"
|
||||
uncrustify -c "$root"/.uncrustify.cfg -l C --replace --no-backup "$file"
|
||||
rm ./*.uncrustify >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
popd
|
||||
}
|
||||
|
||||
format "$source"
|
||||
Reference in New Issue
Block a user