2023-01-07 14:18:21 +00:00
#!/usr/bin/env sh
2024-06-06 15:08:06 +00:00
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
2024-08-15 09:52:52 +00:00
# if running bash (probably as seen in Debian)
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
2024-01-16 07:45:57 +00:00
export PATH="/usr/local/bin::$HOME/bin:$HOME/.local/bin:$HOME/bin${PATH:+:}$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts" # ~vern specifics and more
2023-01-08 03:02:37 +00:00
mesg n 2> /dev/null || true
# then import the rest
2023-01-05 17:22:50 +00:00
source "$HOME/.env"
2023-01-07 14:18:21 +00:00
source "$HOME/.config/aliases"
2023-01-19 11:22:37 +00:00
export POSIX_PROFILE_SOURCED=true
2023-05-12 16:55:54 +00:00
# how about detecting local configs
2023-06-13 09:05:23 +00:00
if [ -f "$HOME/.config/localconfig.env" ]; then
2023-05-12 16:55:54 +00:00
. "$HOME/.config/localconfig.env"
fi
2023-01-19 11:22:37 +00:00
2024-08-13 01:06:17 +00:00
##########################################################################################
# Code snippets from https://git.sr.ht/~sircmpwn/dotfiles/tree/db5945a4/item/.env
##########################################################################################
if ls --version 2>&1 | grep -i gnu >/dev/null
then
alias ls='ls --color=auto '
elif ls --version 2>&1 | grep -i busybox >/dev/null
then
alias ls='ls --color=auto '
fi
alias recent='ls -ltch'
# Add optmizations for multicore builds
if [ $(uname) = "Linux" ]
then
nproc=$(grep '^processor' /proc/cpuinfo | wc -l)
if [ $nproc -gt 4 ]
then
# Reserve two cores
nproc=$((nproc - 2))
fi
export MAKEFLAGS="-j$nproc"
export SAMUFLAGS="-j$nproc"
fi
##########################################################################################