* Moved helpers, common and triggers dirs into xbps-src, where they belong. * Renamed the templates dir to srcpkgs, it was so redundant before. * Make it possible to add subpkgs with no restriction in names, for example udev now has a subpkgs called "libgudev". Previously subpkgs were named "${sourcepkg}-${pkgname}". * xbps-src: changed to look for template files in current directory. That means that most arguments from the targets have been removed. * xbps-src: added a reinstall target, to remove + install. * xbps-src: do not overwrite binpkgs by default, skip them. And more that I forgot because it's a mega-commit that I've been working for some days already... --HG-- extra : convert_revision : 0f466878584d1e6895d2a234f07ea1b2d1e61b3e
60 lines
1 KiB
Bash
60 lines
1 KiB
Bash
# /etc/profile
|
|
|
|
# System wide environment and startup programs, for login setup
|
|
# Functions and aliases go in /etc/bashrc
|
|
|
|
pathmunge () {
|
|
if ! echo $PATH | /usr/bin/egrep -q "(^|:)$1($|:)" ; then
|
|
if [ "$2" = "after" ] ; then
|
|
PATH=$PATH:$1
|
|
else
|
|
PATH=$1:$PATH
|
|
fi
|
|
fi
|
|
}
|
|
|
|
# ksh workaround
|
|
if [ -z "$EUID" -a -x /bin/id ]; then
|
|
EUID=`id -u`
|
|
UID=`id -ru`
|
|
fi
|
|
|
|
# Path manipulation
|
|
if [ "$EUID" = "0" ]; then
|
|
pathmunge /sbin
|
|
pathmunge /usr/sbin
|
|
pathmunge /usr/local/sbin
|
|
else
|
|
pathmunge /usr/local/sbin after
|
|
pathmunge /usr/sbin after
|
|
pathmunge /sbin after
|
|
fi
|
|
|
|
# No core files by default
|
|
ulimit -S -c 0 > /dev/null 2>&1
|
|
|
|
if [ -x /bin/id ]; then
|
|
USER="`id -un`"
|
|
LOGNAME=$USER
|
|
MAIL="/var/spool/mail/$USER"
|
|
fi
|
|
|
|
HOSTNAME=`/bin/hostname 2>/dev/null`
|
|
HISTSIZE=1000
|
|
|
|
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE
|
|
|
|
for i in /etc/profile.d/*.sh ; do
|
|
if [ -r "$i" ]; then
|
|
if [ "$PS1" ]; then
|
|
. $i
|
|
else
|
|
. $i >/dev/null 2>&1
|
|
fi
|
|
fi
|
|
done
|
|
|
|
export PATH
|
|
|
|
unset i
|
|
unset pathmunge
|