Skip to content

Instantly share code, notes, and snippets.

@allex
Last active August 29, 2015 14:05
Show Gist options
  • Save allex/e50cd4685e9e75e607da to your computer and use it in GitHub Desktop.
Save allex/e50cd4685e9e75e607da to your computer and use it in GitHub Desktop.
#!/bin/bash
# Allex personal .bash_local
# GistID: e50cd4685e9e75e607da
# GistURL: https://gist.github.com/e50cd4685e9e75e607da
clearlog() {
t="$1"
[ -z "$t" ] && exit 0;
if [ -f "$t" ]; then
echo "clear file: $t";
cat /dev/null >"$t"
else
if [ -d "$t" ]; then
for f in `find "$t" -type f -name "*.log"`; do clearlog "$f"; done
fi
fi
}
# adb tools
export PATH=$PATH:$HOME/local/android/sdk/platform-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment