diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2007-11-05 16:25:21 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2007-11-05 16:25:21 -0500 |
commit | 357a708e613c83ae35faaa70514a8f4e1179079b (patch) | |
tree | a7687c896efe9b01a473705faa24afd8d004dbdb /pre-apt.d/50uncommitted-changes | |
parent | ab6f7188c53c6580c64702e1cebb5326e998e225 (diff) |
implemented pre-apt checks
other development too..
Diffstat (limited to 'pre-apt.d/50uncommitted-changes')
-rwxr-xr-x | pre-apt.d/50uncommitted-changes | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pre-apt.d/50uncommitted-changes b/pre-apt.d/50uncommitted-changes new file mode 100755 index 0000000..4c0c5ee --- /dev/null +++ b/pre-apt.d/50uncommitted-changes @@ -0,0 +1,16 @@ +#!/bin/sh +set -e +cd /etc +while git-status || ! LANG=C git-status 2>&1 | grep -q "working directory clean" +do + echo "etckeeper warning: /etc has uncommitted changes" >&2 + printf "Press Enter to commit these changes and continue. " + read line + git add . + if ! git commit -m "saving uncommitted changes in /etc prior to apt run"; then + echo "etckeeper warning: git commit failed" >&2 + echo "Please resolve the uncommitted changes by hand." + printf "Press Enter when ready to continue. " + read line + fi +done |