mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 11:04:41 +02:00
20 lines
586 B
Bash
20 lines
586 B
Bash
![]() |
#!/bin/sh
|
||
|
|
||
|
case "$-" in
|
||
|
*i*)
|
||
|
# This shell is interactive, if not ignore this part
|
||
|
# If printing this in non-interactive shells, it'll may prevent scp to work
|
||
|
if [ -d "/etc/nixos" ]; then
|
||
|
changes=`git -C /etc/nixos status --porcelain | wc -l`
|
||
|
|
||
|
if [ $changes -gt 0 ]; then
|
||
|
echo -e '\e[01;31m' >&2
|
||
|
echo -e '######################################' >&2
|
||
|
echo -e '# NixOS-config-Repo is not commited! #' >&2
|
||
|
echo -e '######################################' >&2
|
||
|
echo -e '\e[0m' >&2
|
||
|
fi
|
||
|
fi
|
||
|
;;
|
||
|
esac
|