File: sb2rc.emulate

package info (click to toggle)
scratchbox2 2.2.4-1debian1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,392 kB
  • ctags: 5,239
  • sloc: ansic: 21,734; sh: 4,360; perl: 2,170; cpp: 1,913; makefile: 610; python: 184
file content (40 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download
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
32
33
34
35
36
37
38
39
40
#
# Configuration variables for sb2 - specific to the "emulate" mapping mode.
#
# First argument is "initializing" when this script is included from sb2-init,
# or "starting" when included from the "sb2" script, or name of the command
# wrapper which needs mode-specific parameters ("dpkg", "apt-get", etc),
# and empty otherwise.
sb2rc_mode="$1"


case "$sb2rc_mode" in

	initializing)
		SB2INIT_CROSS_GCC_PREFIX_LIST=$ARCH-linux-:$ARCH-linux-gnueabi-:$ARCH-linux-gnu-
		if [ "$ARCH" != "$MACHINE_ARCH" ]; then
			SB2INIT_CROSS_GCC_PREFIX_LIST=$SB2INIT_CROSS_GCC_PREFIX_LIST:$MACHINE_ARCH-linux-:$MACHINE_ARCH-linux-gnueabi-:$MACHINE_ARCH-linux-gnu-
		fi
		;;

	starting)
		# Make sure /var/log/apt exists, needed when 
		# running as "sb2 -eR":
		if [ "$SBOX_SESSION_PERM" = "root" -a \
		     -d $SBOX_TARGET_ROOT/var/log ]; then
			if [ ! -d $SBOX_TARGET_ROOT/var/log/apt ]; then
				mkdir $SBOX_TARGET_ROOT/var/log/apt
			fi
		fi
		;;

	wrapper_list)
		SBOX_WRAPPERS="gdb ldconfig"
		;;

	*)
		# Default.
		;;

esac