19ed80187d92e06e717e15396aa9e267e5e89543
[pkgusr] / etc / pkgusr / bash_profile
1 # -*- shell-script -*-
2 # couple of environment settings to ensure sanity
3 set +h
4 umask 022
5
6 ## We live in a unicode world now
7 LANG=en_AU.UTF-8
8 LC_CTYPE=en_AU.UTF-8
9
10 ## PATH
11 # The wrappers directory must be the first entry in the PATH.  
12 #
13 # Once you are no longer needing or using the tools dir you can remove it
14 # from the PATH if you want, but leaving it there won't hurt.
15 #PATH=/usr/lib/pkgusr:/usr/bin:/usr/X11R6/bin:/opt/qt/bin:/tools/bin
16 PATH=/usr/lib/pkgusr:/usr/bin:/usr/X11R6/bin:/opt/qt/bin
17
18 ## A couple things to make less(1) nicer.
19 LESS='-FgiMrswX --use-color'
20 LESSCHARSET=utf-8
21 LESSOPEN='|lesspipe.sh %s'
22
23 ## Timezone -- set to your local zone
24 TZ='Australia/Brisbane'
25
26 ## QT
27 QTDIR=/opt/qt
28
29 ## pkg-config
30 _XORG=/usr/X11R6/lib/pkgconfig:/usr/X11R6/share/pkgconfig
31 _KDE=/opt/kde/lib/pkgconfig:/opt/kde/share/pkgconfig
32 _QT=${QTDIR}/lib/pkgconfig
33 _PKGCFG=$(pkg-config --variable pc_path pkg-config)
34 PKG_CONFIG_PATH=${_PKGCFG}:${_XORG}:${_KDE}:${_QT}
35
36 # unset the tmp vars
37 unset _XORG _KDE _QT _PKGCFG
38
39 ## Locale directory suppression.
40 #  If this is set to `1' (one) then the install and mkdir wrappers
41 #  won't put anything in /usr/share/locale.  Technically, the mkdir
42 #  wrapper still creates the dir, but it is removed afterward.  If
43 #  you want to override this behaviour globally, set this to `0'
44 #  (zero) here, or you can override an individual package by adding
45 #  `SUPPRESSLOCALEDIR=0' to that pkgusr's ~/.pkgusrrc.
46 #
47 #  See the comments in the install wrapper for more detail and
48 #  rationale.
49 SUPPRESSLOCALEDIR=1
50
51 ## Build script update checks
52 #  If this is set to `1' (one) a check is done to see if there is a
53 #  newer build script available that the pkgusr could update to.  If an
54 #  update is available a message is printed to stdout with instructions
55 #  of how to proceed.
56 #
57 #  Override this in ~/.pkgusrrc.
58 CHECKUPDATES=1
59
60 ## Slackware PKG local repo
61 #  Having a shortcut to a local Slackware PKG repo is very useful.
62 #  Pat Volkerding and his team are of a minority who actually know
63 #  what they are doing.  I always check Slackware for patches.
64 #
65 #  I get the Slack source via rsync.
66 #  See https://mirrors.slackware.com/mirrorlist/
67 #
68 SLACKPKG=/home/steve/download/Slackware/slackware64-current/source
69 #  Obviously edit to suit your situation
70
71 ### export everything
72 export LANG LC_CTYPE PATH LESS LESSCHARSET LESSOPEN TZ PKG_CONFIG_PATH QTDIR
73 export SUPPRESSLOCALEDIR CHECKUPDATES SLACKPKG
74
75 # Make prompt reflect that we are a package user.
76 export PROMPT_COMMAND='PS1="[pkgusr (\u)] \w> "'
77
78 # Pretty colours
79 eval $(dircolors -b)
80 alias ls='ls --color=always -Fb'
81
82 # Suck in some handy shell functions
83 . /etc/pkgusr/handy_funcs
84
85 # Go to the home directory whenever we su to a package user.
86 cd
87
88 # Setup the git config if needed
89 if [[ ! -d ${HOME}/.config/git && -f ${HOME}/.gitconfig ]]; then
90     prep_git
91 fi
92
93 # Bash Completion
94 if [ -f /usr/share/bash-completion/bash_completion ]; then
95     . /usr/share/bash-completion/bash_completion
96 fi
97
98 # If they exist, load any private settings.  This comes last so that
99 # we can override any system defaults if need be
100 if [ -f ${HOME}/.pkgusrrc ]; then
101     . ${HOME}/.pkgusrrc
102 fi
103
104 ###
105 # Don't put anything below here unless it relies on something being
106 # set in ~/.pkgusrrc
107 ###
108
109 # Maybe check if the build script can be updated, but not on dumb
110 # terms so that TRAMP still works.
111 if [ ${CHECKUPDATES} -eq 1 -a "$TERM" != "dumb" ]; then
112     checkupdates
113 fi
114
115
116 # Local variables:
117 # sh-basic-offset: 4
118 # End: