summaryrefslogtreecommitdiff
path: root/.zsh/zshfunctions
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-02-25 01:45:14 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-02-25 01:45:14 +0100
commit9d59f8bab76605b683bf84f6ae0d496b4cbf20d0 (patch)
tree0cc79439d1404072a6ba2178795cb2b632329b6d /.zsh/zshfunctions
parent7e45e6a89e02fea6b7e28b075e230407ee1df709 (diff)
downloaddotfiles-9d59f8bab76605b683bf84f6ae0d496b4cbf20d0.tar.gz
dotfiles-9d59f8bab76605b683bf84f6ae0d496b4cbf20d0.tar.bz2
dotfiles-9d59f8bab76605b683bf84f6ae0d496b4cbf20d0.zip
Restricting 'cci' to given files just makes things too complicated. Thus remove the feature
Diffstat (limited to '.zsh/zshfunctions')
-rw-r--r--.zsh/zshfunctions21
1 files changed, 11 insertions, 10 deletions
diff --git a/.zsh/zshfunctions b/.zsh/zshfunctions
index 8e3620a..9f0270e 100644
--- a/.zsh/zshfunctions
+++ b/.zsh/zshfunctions
@@ -33,23 +33,20 @@ open_ebuild ()
}
# Commit a new config change
+# Works only for simple cases
cci ()
{
- local message files
- local tok=__cci__
-
if [[ $# == 0 ]]; then
echo "No message given. Aborting."
return 1
fi
- message=$1
- shift
- files=$@
+ local message=$1
+ local tok=__cci__
pushd -q ~
- cstg diff $files
+ cstg diff
echo -n "Is this ok? [y/n] "
if ! read -q; then
@@ -57,14 +54,15 @@ cci ()
echo "I would have done the wrong thing ... aborting!"
return 2
fi
-
+
echo ">> Creating new patch"
cstg new $tok -m "$message"
echo ">> Refreshing"
- cstg refresh $files
+ cstg refresh
if [[ -z $(cstg files) ]]; then
+ echo
echo "Ehm - this patch is empty. Narf. Aborting!"
echo "Deleting useless patch"
cstg del $tok
@@ -75,6 +73,7 @@ cci ()
cstg commit $tok
if [[ -n $(cstg series --applied) ]]; then
+ echo
echo "Urgs! Something went wrong. There are still patches applied."
echo "Clean up for yourself. Aborting here!"
return 4
@@ -85,8 +84,10 @@ cci ()
echo ">> Re-apply patches"
cstg push -a
-
+
echo ">> Done"
+
+ popd -q
}
if [[ $UID == 0 ]]; then