Browse Source

Sort items alphabetically

Alois Mahdal 9 years ago
parent
commit
95faf37676
2 changed files with 32 additions and 31 deletions
  1. 30
    29
      mkit/include/common.sh
  2. 2
    2
      mkit/make

+ 30
- 29
mkit/include/common.sh View File

1
 #!/bin/bash
1
 #!/bin/bash
2
 
2
 
3
-configure() {
4
-    #
5
-    # Load variables fdom config.mk
6
-    #
7
-    tmp=$(mktemp)
8
-    sed -e 's/ = /=/' < config.mk > $tmp
9
-    . $tmp
10
-    rm -f $tmp
11
-}
12
-
13
 build1() {
3
 build1() {
14
     local srcpath dstpath
4
     local srcpath dstpath
15
     srcpath=$1
5
     srcpath=$1
45
     } || :
35
     } || :
46
 }
36
 }
47
 
37
 
38
+configure() {
39
+    #
40
+    # Load variables fdom config.mk
41
+    #
42
+    tmp=$(mktemp)
43
+    sed -e 's/ = /=/' < config.mk > $tmp
44
+    . $tmp
45
+    rm -f $tmp
46
+}
47
+
48
 dist() {
48
 dist() {
49
     #
49
     #
50
     # Create distributable tarball
50
     # Create distributable tarball
96
     "
96
     "
97
 }
97
 }
98
 
98
 
99
-install() {
100
-    #
101
-    # Install product
102
-    #
103
-    mkdir -vp $bindir \
104
-              $docdir \
105
-              $shrdir
106
-    list_of_bins | xargs cp -vrt $bindir
107
-    list_of_installed_bins | xargs chmod -v 755
108
-    test -f .autoclean && clean || :
109
-}
110
-
111
 get_version() {
99
 get_version() {
112
     #
100
     #
113
     # Build semver version string with build metadata
101
     # Build semver version string with build metadata
178
     fi
166
     fi
179
     echo $version
167
     echo $version
180
 }
168
 }
181
-uninstall() {
169
+
170
+install() {
182
     #
171
     #
183
-    # Uninstall product
172
+    # Install product
184
     #
173
     #
185
-    list_of_installed_bins | xargs rm -vf
186
-    rm -vrf $shrdir
187
-    rm -vrf $docdir
188
-    rm -vf $mandir/man1/fff.1
189
-    rm -vf $mandir/man3/ffoo.3
174
+    mkdir -vp $bindir \
175
+              $docdir \
176
+              $shrdir
177
+    list_of_bins | xargs cp -vrt $bindir
178
+    list_of_installed_bins | xargs chmod -v 755
179
+    test -f .autoclean && clean || :
190
 }
180
 }
191
 
181
 
192
 route() {
182
 route() {
201
             echo "usage: $(basename $0) build|clean|dist|install|uninstall" >&2
191
             echo "usage: $(basename $0) build|clean|dist|install|uninstall" >&2
202
     esac
192
     esac
203
 }
193
 }
194
+
195
+uninstall() {
196
+    #
197
+    # Uninstall product
198
+    #
199
+    list_of_installed_bins | xargs rm -vf
200
+    rm -vrf $shrdir
201
+    rm -vrf $docdir
202
+    rm -vf $mandir/man1/fff.1
203
+    rm -vf $mandir/man3/ffoo.3
204
+}

+ 2
- 2
mkit/make View File

39
     echo bin
39
     echo bin
40
     echo config.mk
40
     echo config.mk
41
     echo doc
41
     echo doc
42
+    echo ffoo.sh.skel
42
     echo include
43
     echo include
44
+    echo LICENSE
43
     echo Makefile
45
     echo Makefile
44
     echo mkit
46
     echo mkit
45
-    echo ffoo.sh.skel
46
     echo README
47
     echo README
47
-    echo LICENSE
48
     echo test
48
     echo test
49
 }
49
 }
50
 
50