Browse code

fixes for compatibility, bring back <<< as its a 2.0 bash feature

Nat! authored on 01-04-2017 11:25:11
Showing 4 changed files
... ...
@@ -1,4 +1,4 @@
1
-#! /bin/sh
1
+#! /usr/bin/env bash
2 2
 #
3 3
 #   Copyright (c) 2015-2017 Nat! - Mulle kybernetiK
4 4
 #   All rights reserved.
... ...
@@ -1,4 +1,4 @@
1
-#! /bin/sh
1
+#! /usr/bin/env bash 
2 2
 #
3 3
 #   Copyright (c) 2017 Nat! - Mulle kybernetiK
4 4
 #   All rights reserved.
... ...
@@ -34,9 +34,7 @@ MULLE_BOOTSTRAP_COPY_SH="included"
34 34
 
35 35
 tar_remove_extension()
36 36
 {
37
-   local ext
38
-
39
-   ext="$1"
37
+   local ext="$1"
40 38
 
41 39
    if [ ! -z "${ext}" ]
42 40
    then
... ...
@@ -45,6 +43,10 @@ tar_remove_extension()
45 43
             echo "-s/\.$1\$//"
46 44
          ;;
47 45
 
46
+         linux)
47
+            echo "--transform s/\.$1\$//"
48
+         ;;
49
+
48 50
          *)
49 51
             echo "--transform /\.$1\$//"
50 52
          ;;
... ...
@@ -713,7 +713,11 @@ _canonical_clone_name()
713 713
    name="`echo "${name%%.*}"`"
714 714
 
715 715
    case "${name}" in
716
-      .*|"")
716
+      "")
717
+         fail "clone name can't be empty"
718
+      ;;
719
+
720
+      .*)
717 721
          fail "clone name can't start with a '.'"
718 722
       ;;
719 723
    esac