File: tree_status.sh

package info (click to toggle)
conmon 2.1.13%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 732 kB
  • sloc: ansic: 3,324; sh: 701; makefile: 120
file content (17 lines) | stat: -rwxr-xr-x 358 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# this script is based off of the similarly named in github.com/containers/libpod/hack/tree_status.sh

set -e

SUGGESTION="${SUGGESTION:-call 'make config' and commit all changes.}"

STATUS=$(git status --porcelain)
if [[ -z $STATUS ]]
then
	echo "tree is clean"
else
	echo "tree is dirty, please $SUGGESTION"
	echo ""
	echo "$STATUS"
	exit 1
fi