Browse code

various bugfixes, mostly for linux

Nat! authored on 01-04-2017 12:14:56
Showing 4 changed files
... ...
@@ -361,7 +361,7 @@ bootstrap_main()
361 361
    local previous
362 362
 
363 363
    case "${command}" in
364
-      -h|--help|init|help)
364
+      -h|--help|config|help|init|uname)
365 365
       ;;
366 366
 
367 367
       *)
... ...
@@ -392,7 +392,7 @@ bootstrap_main()
392 392
    if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "NO" ]
393 393
    then
394 394
       case "${command}" in
395
-         clean|dist-clean|init|status|show|config|setting)
395
+         clean|dist-clean|init|status|show|config|setting|uname)
396 396
          ;;
397 397
 
398 398
          *)
... ...
@@ -65,6 +65,7 @@ _archive_files()
65 65
 {
66 66
    local srcdir="$1"
67 67
    local ext="$2"
68
+   local taroptions="$3"
68 69
 
69 70
    (
70 71
       exekutor cd "${srcdir}" ;
... ...
@@ -79,18 +80,14 @@ _archive_files()
79 80
 }
80 81
 
81 82
 
82
-_filter_boring_tar_output()
83
-{
84
-   egrep -v 'Already exist|Error exit delayed'
85
-   :
86
-}
87
-
88 83
 
89 84
 _unarchive_files()
90 85
 {
91 86
    local dstdir="$1"
92 87
    local noclobber="$2"
93 88
 
89
+   [ -d "${dstdir}" ] || fail "${dstdir} does not exist"
90
+   
94 91
    (
95 92
       exekutor cd "${dstdir}" ;
96 93
       if [ "${noclobber}" = "NO" ]
... ...
@@ -98,9 +95,9 @@ _unarchive_files()
98 95
          exekutor tar -x ${TARFLAGS} -f -
99 96
       else
100 97
          exekutor tar -x ${TARFLAGS} -k -f -
101
-         :
102
-      fi 2>&1 | _filter_boring_tar_output
103
-   ) >&2 # 2> /dev/null   #intentional order
98
+      fi
99
+      :  # ignore trashy tar rval 
100
+   )  2> /dev/null 
104 101
 }
105 102
 
106 103
 
... ...
@@ -125,7 +122,7 @@ _copy_files()
125 122
    #
126 123
    # copy over files only, let tar remove extension
127 124
    #
128
-   _archive_files "${srcdir}" "${ext}" | _unarchive_files "${dstdir}" "${noclobber}"
125
+   _archive_files "${srcdir}" "${ext}" "${taroptions}" | _unarchive_files "${dstdir}" "${noclobber}"
129 126
 }
130 127
 
131 128
 
... ...
@@ -782,7 +782,7 @@ tar_unpack()
782 782
    esac
783 783
 
784 784
    rmdir_safer "${name}.tmp"
785
-   tmpdir="`exekutor mktemp -d "${name}.tmp"`" || return 1
785
+   tmpdir="`exekutor mktemp -d "${name}.XXXX.tmp"`" || return 1
786 786
    (
787 787
       exekutor cd "${tmpdir}" || return 1
788 788
 
... ...
@@ -847,7 +847,7 @@ zip_unpack()
847 847
    archivename="`extension_less_basename "${download}"`"
848 848
 
849 849
    rmdir_safer "${name}.tmp"
850
-   tmpdir="`exekutor mktemp -d "${name}.tmp"`" || exit 1
850
+   tmpdir="`exekutor mktemp -d "${name}.XXXX.tmp"`" || exit 1
851 851
    (
852 852
       exekutor cd "${tmpdir}" || return 1
853 853
 
... ...
@@ -1,4 +1,4 @@
1
-#! /bin/sh
1
+#! /bin/sh -x
2 2
 
3 3
 clear_test_dirs()
4 4
 {