local/bin/package-lister: Use same formatting as homesync

master
Pierre Neidhardt 2018-07-20 14:49:17 +02:00
parent eb1c16ccc5
commit fea7abb2aa
1 changed files with 17 additions and 3 deletions

View File

@ -31,6 +31,20 @@ EOF
guix --version >"$PKG_ROOT/guix-version"
fi
echo >&2 "* Uncommitted files:"
git -C "$PKG_ROOT" diff --name-only .
git -C "$PKG_ROOT" diff --cached --name-only .
YELLOW='\033[0;33m\033[1m'
BOLD='\033[0m\033[1m'
NORMAL='\033[0m'
message() {
echo -e "$YELLOW:: $@$NORMAL"
}
status() {
local title=$1
local body=$2
[ -z "$body" ] && return
message "$title"
echo "$body"
}
status "Unpushed files" "$(git -C "$PKG_ROOT" diff --cached --name-only .)"
status "Unstaged files" "$(git -C "$PKG_ROOT" diff --name-only .)"