xref: /haiku/data/system/boot/SetupEnvironment (revision 4bd0c1066b227cec4b79883bdef697c7a27f2e90)
1#
2# First we set up a bunch of environment variables that we want everyone
3# to inherit
4#
5
6export HOME=/boot/home
7export LC_CTYPE="en_US.UTF-8"
8
9BUILDHOME=/boot/system/develop
10
11case `uname -m` in
12BePC|Intel|unknown)
13	BE_HOST_CPU=x86
14	;;
15BeMac|BeBox)
16	BE_HOST_CPU=ppc
17	;;
18*)
19	BE_HOST_CPU=`uname -m`
20esac
21
22# not used by Haiku, but by (legacy) applications (e.g. Pe)
23BH=$BUILDHOME/headers
24BEINCLUDES="$BH;$BH/be;$BH/posix;$BH/glibc;$BH/cpp;$BH/be/app;$BH/be/device;$BH/be/interface;$BH/be/locale;$BH/be/media;$BH/be/midi;$BH/be/midi2;$BH/be/net;$BH/be/kernel;$BH/be/storage;$BH/be/support;$BH/be/game;$BH/be/opengl;$BH/be/drivers;$BH/gnu;$BH/be/mail;$BH/be/translation;$BH/be/devel;$BH/be/add-ons/graphics;$BH/be/be_apps/NetPositive;$BH/be/be_apps/Tracker"
25
26export BUILDHOME
27export BEINCLUDES
28export BE_HOST_CPU
29
30if [ "$SAFEMODE" != "yes" ]
31then
32	export PATH=.:$HOME/config/non-packaged/bin:$HOME/config/bin:/boot/system/non-packaged/bin:/bin:/boot/system/apps:/boot/system/preferences
33	export LIBRARY_PATH="%A/lib:$HOME/config/non-packaged/lib:$HOME/config/lib:/boot/system/non-packaged/lib:/boot/system/lib"
34	export ADDON_PATH="%A/add-ons:$HOME/config/non-packaged/add-ons:$HOME/config/add-ons:/boot/system/non-packaged/add-ons:/boot/system/add-ons"
35else
36	export PATH=.:/bin:/boot/system/apps:/boot/system/preferences
37	export LIBRARY_PATH="%A/lib:/boot/system/lib"
38	export ADDON_PATH="%A/add-ons:/boot/system/add-ons"
39fi
40
41# Locale
42export LC_MESSAGES=`locale -m`
43export LC_NUMERIC=`locale -f`
44export LC_TIME=`locale -t`
45export LC_COLLATE=$LC_MESSAGES
46export LC_CTYPE=$LC_MESSAGES
47export LC_MONETARY=$LC_NUMERIC
48
49if [ "$SAFEMODE" != "yes" ]
50then
51	if [ -f $HOME/config/settings/boot/UserSetupEnvironment ]
52	then
53     	. $HOME/config/settings/boot/UserSetupEnvironment
54	fi
55fi
56