summaryrefslogtreecommitdiff
path: root/functions/architecture.sh
blob: fb0e910c135d6321795aa8c6e047d0856d5291d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

# architecture.sh - handle architecture specific support
# Copyright (C) 2007 Otavio Salvador <otavio@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.

set -e

Check_architecture ()
{
	ARCHITECTURES="${@}"
	VALID="false"

	for ARCHITECTURE in ${ARCHITECTURES}
	do
		if [ "${ARCHITECTURE}" = "${LIVE_ARCHITECTURE}" ]
		then
			VALID="true"
			break
		fi
	done

	if [ "${VALID}" = "false" ]
	then
		Echo_warning "skipping ${0}, foreign architecture."
		exit 0
	fi
}