Commit ddbe69c0 authored by bg nerilex's avatar bg nerilex

+some shell scripts

parent 764a0b2b
#!/bin/bash
tool="clang-format-3.5"
param="-i -style=file"
if [ "x$1" = "x" ]; then
find '(' -iname '*.c' -or -iname '*.h' ')' -exec ${tool} ${param} "{}" ";"
else
for d in $@; do
find "$d" '(' -iname '*.c' -or -iname '*.h' ')' -exec ${tool} ${param} "{}" ";"
done
fi
#!/bin/bash
for f in $@; do
tr -d '\006' < "$f" > .tmp
csplit -f .tmp- .tmp '/embedded-Crypto-Lib/-1' '{*}'
rm .tmp .tmp-00;
for i in .tmp-*; do
name=$(sed -n 's#^.*Primitive Name:[\ \t]*\([^\ \t].*[^\ \t]\)[\ \t]*$#\1#p' "$i")
sizes=$(sed -n 's#.*size:[\ \t]\([0-9]*\).*$#\1-#p' "$i")
fname=$(echo "${name}-${sizes}nessie.log" | tr -d '\n\r/\\' | tr '[:upper:]' '[:lower:]')
mv "$i" "$fname"
done
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment