File tree Expand file tree Collapse file tree 2 files changed +69
-19
lines changed Expand file tree Collapse file tree 2 files changed +69
-19
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,22 @@ The repository contains the following set of files:
29
29
- In the *build * folder, folders and files that have a sequence number are a previous package build.
30
30
31
31
32
+ The make_deb Script
33
+ ===================
34
+
35
+ .. code-block :: console
36
+
37
+ $ ./make_deb --help
38
+ make_deb {x86|arm} [clean|cleanall]
39
+ This script is used to create the Debian package of FogLAMP
40
+ Arguments:
41
+ x86 - Build an x86_64 package
42
+ arm - Build an armv7l package
43
+ clean - Remove all the old versions saved in format .XXXX
44
+ cleanall - Remove all the versions, including the last one
45
+ $
46
+
47
+
32
48
Building a Package
33
49
==================
34
50
@@ -91,4 +107,9 @@ If you execute the ``make_deb`` command again, you will see:
91
107
92
108
... where the previous build is now marked with the suffix *.0001 *.
93
109
94
-
110
+
111
+ Cleaning the Package Folder
112
+ ===========================
113
+
114
+ Use the ``clean `` option to remove all the old packages and the files used to make the package.
115
+ Use the ``cleanall `` option to remove all the packages and the files used to make the package.
Original file line number Diff line number Diff line change 22
22
23
23
set -e
24
24
25
- usage=" $( basename " $0 " ) {x86|arm}
25
+ GIT_ROOT=` pwd` # The script must be executed from the root git directory
26
+
27
+ architecture=" none"
28
+ usage=" $( basename " $0 " ) {x86|arm} [clean|cleanall]
26
29
This script is used to create the Debian package of FogLAMP
27
30
Arguments:
28
- x86 - Build an x86_64 package
29
- arm - Build an armv7l package"
30
-
31
- GIT_ROOT=` pwd` # The script must be executed from the root git directory
31
+ x86 - Build an x86_64 package
32
+ arm - Build an armv7l package
33
+ clean - Remove all the old versions saved in format .XXXX
34
+ cleanall - Remove all the versions, including the last one"
35
+
36
+ for i in " $@ "
37
+ do
38
+ case " $i " in
39
+ x86)
40
+ architecture=" x86_64"
41
+ shift
42
+ ;;
43
+ arm)
44
+ architecture=" armhf"
45
+ shift
46
+ ;;
47
+ clean)
48
+ echo -n " Cleaning the build folder from older versions..."
49
+ find " ${GIT_ROOT} /packages/Debian/build" -maxdepth 1 | grep ' .*\.[0-9][0-9][0-9][0-9]' | xargs rm -rf
50
+ echo " Done."
51
+ shift
52
+ ;;
53
+ cleanall)
54
+ if [ -d " ${GIT_ROOT} /packages/Debian/build" ]; then
55
+ echo -n " Cleaning the build folder..."
56
+ rm -rf ${GIT_ROOT} /packages/Debian/build/*
57
+ echo " Done."
58
+ else
59
+ echo " No build folder, skipping cleanall"
60
+ fi
61
+ shift
62
+ ;;
63
+ * )
64
+ echo " ${usage} "
65
+ exit 1
66
+ ;;
67
+ esac
68
+ done
69
+
70
+ # If the architecture has not been defined, then the script is complete
71
+ if [[ " $architecture " == " none" ]]; then
72
+ exit 0
73
+ fi
32
74
33
75
# Check FOGLAMP_ROOT
34
76
if [ -z ${FOGLAMP_ROOT+x} ]; then
45
87
version=` cat ${FOGLAMP_ROOT} /VERSION | tr -d ' ' | grep ' foglamp_version=' | head -1 | sed -e ' s/\(.*\)=\(.*\)/\2/g' `
46
88
BUILD_ROOT=" ${GIT_ROOT} /packages/Debian/build"
47
89
48
- case " $1 " in
49
- x86)
50
- architecture=" x86_64"
51
- ;;
52
- arm)
53
- architecture=" armhf"
54
- ;;
55
- * )
56
- echo " ${usage} "
57
- exit 1
58
- ;;
59
- esac
60
-
61
90
# Final package name
62
91
package_name=" foglamp-${version} -${architecture} "
63
92
You can’t perform that action at this time.
0 commit comments