Преглед на файлове

Add death routines to git sibling

Alois Mahdal преди 11 години
родител
ревизия
222e0c574c
променени са 1 файла, в които са добавени 11 реда и са изтрити 0 реда
  1. 11
    0
      dotfiles/gittum/bin/sibling

+ 11
- 0
dotfiles/gittum/bin/sibling Целия файл

33
 ## funz
33
 ## funz
34
 #
34
 #
35
 
35
 
36
+die() {
37
+    echo "$@" 1>&2
38
+    exit 1
39
+}
40
+
41
+usage() {
42
+    echo "usage: git $(basename $0) NEWPROJ [TEMPLATE]"
43
+    exit 0
44
+}
45
+
36
 rewrite_uri_to () {
46
 rewrite_uri_to () {
37
     # create a new remote URI based on current one
47
     # create a new remote URI based on current one
38
     git remote -v \
48
     git remote -v \
48
 #
58
 #
49
 
59
 
50
 project=$1
60
 project=$1
61
+test -n "$project" || usage
51
 
62
 
52
 if [ -f $sibling_conf ];
63
 if [ -f $sibling_conf ];
53
 then
64
 then