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,15 +1,5 @@
1 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 3
 build1() {
14 4
     local srcpath dstpath
15 5
     srcpath=$1
@@ -45,6 +35,16 @@ clean() {
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 48
 dist() {
49 49
     #
50 50
     # Create distributable tarball
@@ -96,18 +96,6 @@ expand_variables() {
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 99
 get_version() {
112 100
     #
113 101
     # Build semver version string with build metadata
@@ -178,15 +166,17 @@ get_version() {
178 166
     fi
179 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 182
 route() {
@@ -201,3 +191,14 @@ route() {
201 191
             echo "usage: $(basename $0) build|clean|dist|install|uninstall" >&2
202 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,12 +39,12 @@ list_of_dist_items() {
39 39
     echo bin
40 40
     echo config.mk
41 41
     echo doc
42
+    echo ffoo.sh.skel
42 43
     echo include
44
+    echo LICENSE
43 45
     echo Makefile
44 46
     echo mkit
45
-    echo ffoo.sh.skel
46 47
     echo README
47
-    echo LICENSE
48 48
     echo test
49 49
 }
50 50