File: tree_status.sh

package info (click to toggle)
golang-github-containers-dnsname 1.1.1%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 196 kB
  • sloc: sh: 173; makefile: 77
file content (15 lines) | stat: -rwxr-xr-x 257 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
set -e

SUGGESTION="${SUGGESTION:-sync the vendor.conf 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