summaryrefslogtreecommitdiff
path: root/pre-apt.d/50uncommitted-changes
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2007-11-05 18:43:39 -0500
committerJoey Hess <joey@kodama.kitenet.net>2007-11-05 18:43:39 -0500
commit6300374281888b2f738f719e057b5e74db9706f5 (patch)
treeeed3f22257c708f5dbaa3ae49c2a8478a98ed341 /pre-apt.d/50uncommitted-changes
parentb42d7c03371d9f1dab89a8d7a3e5bb85e8774e14 (diff)
polish
Diffstat (limited to 'pre-apt.d/50uncommitted-changes')
-rwxr-xr-xpre-apt.d/50uncommitted-changes14
1 files changed, 7 insertions, 7 deletions
diff --git a/pre-apt.d/50uncommitted-changes b/pre-apt.d/50uncommitted-changes
index 5a198ef..c8e4736 100755
--- a/pre-apt.d/50uncommitted-changes
+++ b/pre-apt.d/50uncommitted-changes
@@ -1,15 +1,15 @@
#!/bin/sh
set -e
-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
+if ! LANG=C git-status 2>&1 | grep -q "working directory clean"; then
+ git-status || true
+ echo "etckeeper warning: /etc is not clean" >&2
+ printf "Press Enter to commit changes and continue. "
+ read line </dev/tty
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
+ read line </dev/tty
fi
-done
+fi