File: autoformat.sh

package info (click to toggle)
freerdp2 2.0.0~git20190204.1.2693389a+dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 22,772 kB
  • sloc: ansic: 307,908; xml: 1,676; sh: 770; perl: 231; makefile: 158; python: 65
file content (10 lines) | stat: -rwxr-xr-x 331 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
MY_PATH="`dirname \"$0\"`"              # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
CHANGESET=`git status | cut -d ':' -f 2 | grep -vE "#|no" | grep -E "*\.h|*\.c"` # get filenames from git status

for f in $CHANGESET; do
	if [ -e $f ]; then
		sh $MY_PATH/format_code.sh $f
	fi
done