File: precommit.sh

package info (click to toggle)
pdb2pqr 3.6.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,780 kB
  • sloc: python: 13,212; xml: 8,252; sh: 48; makefile: 30
file content (22 lines) | stat: -rwxr-xr-x 539 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

scriptname=`basename $0`
tmpfile=$(mktemp ./${basename}.$$)

cat .github/workflows/python-package.yml | grep black  | grep check | sed -e "s/^\s+//" -e "s/\"/'/g"  >  $tmpfile
cat .github/workflows/python-package.yml | grep flake8 | grep count | sed -e "s/^\s+//" -e "s/10/200/" >> $tmpfile

echo "Run these commands:"
cat $tmpfile

while IFS= read command
do
  echo "Command 1: #${command}#"
  command=`echo $command | sed -e "s/\s+//"`
  echo "Command 2: #${command}#"
  $command
done < "$tmpfile"

rm -f "$tmpfile"

exit 0