瀏覽代碼

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