xref: /haiku/data/system/boot/SetupEnvironment (revision 4365774b6889e9467e4fd8719c5c89ca56240d28)
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" ]; then
31	export PATH=.:$HOME/config/non-packaged/bin:$HOME/config/bin:/boot/system/non-packaged/bin:/bin:/boot/system/apps:/boot/system/preferences
32	export LIBRARY_PATH="%A/lib:$HOME/config/non-packaged/lib:$HOME/config/lib:/boot/system/non-packaged/lib:/boot/system/lib"
33	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"
34else
35	export PATH=.:/bin:/boot/system/apps:/boot/system/preferences
36	export LIBRARY_PATH="%A/lib:/boot/system/lib"
37	export ADDON_PATH="%A/add-ons:/boot/system/add-ons"
38fi
39
40# Locale
41export LC_MESSAGES=`locale --message`
42export LC_NUMERIC=`locale --format`
43export LC_TIME=`locale --time`
44export LC_COLLATE=$LC_MESSAGES
45export LC_CTYPE=$LC_MESSAGES
46export LC_MONETARY=$LC_NUMERIC
47
48if [ "$SAFEMODE" != "yes" ]; then
49	if [ -f $HOME/config/settings/boot/UserSetupEnvironment ]; then
50     	. $HOME/config/settings/boot/UserSetupEnvironment
51	fi
52fi
53
54export USER=`id -un`
55export GROUP=`id -gn`
56