build.sh 1.05 KB
Newer Older
1 2 3 4 5
#!/bin/bash

set -e
set -o pipefail  # Bashism

EclipseSpark's avatar
EclipseSpark committed
6 7 8
export variant=$2
export arch=$3
export version=$4
EclipseSpark's avatar
EclipseSpark committed
9 10


EclipseSpark's avatar
EclipseSpark committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24
function helper() {
	echo -e "Parrot Build System


USAGE
 	 ./build.sh <action> [<variant> <arch> <version>]

EXPLAINATION

      action  - help, build
                the action to be performed by this program
                help will show this message, build will start
                the build if correctly combined with variant, arch and version

25
      variant - home, security, kde, studio
EclipseSpark's avatar
EclipseSpark committed
26 27 28 29

                the edition of parrot that is going to
                be taken from the templates folder

Lorenzo Faletra's avatar
Lorenzo Faletra committed
30
      arch    - i386, amd64, armhf, arm64
EclipseSpark's avatar
EclipseSpark committed
31 32 33 34
                the architecture that will be built

      version - the version of parrot that has to be
                written in the live boot menu
Lorenzo Faletra's avatar
Lorenzo Faletra committed
35

EclipseSpark's avatar
EclipseSpark committed
36
EXAMPLE
Lorenzo Faletra's avatar
Lorenzo Faletra committed
37
 	 ./build.sh build home amd64 4.6-CUSTOM
EclipseSpark's avatar
EclipseSpark committed
38 39 40 41 42
"
}

function build() {
	lb clean
43
	rm -rf config || true
EclipseSpark's avatar
EclipseSpark committed
44
	lb config
45
	lb build
Lorenzo Faletra's avatar
Lorenzo Faletra committed
46
	mv live-image-*.hybrid.iso ../Parrot-$variant-$version\_$arch.iso
EclipseSpark's avatar
EclipseSpark committed
47 48 49 50 51 52 53 54 55 56 57 58 59
}

case $1 in
	build)
		build
	;;
	help)
		helper
	;;
	*)
		helper
	;;
esac