dotfiles-modern/.env

49 lines
1.6 KiB
Bash

#!/usr/bin/env sh
# SPDX-License-Identifier: MIT AND MPL-2.0
#
# This is POSIX sh-compartible shell script to sourced for both shortcuts
# to daily commands I use and then some.
#
# PLEASE DO NOT LEAK ANY SECRETS, INCLUDING DOPPLER CLI TOKENS AND TAILSCALE_AUTHKEYS
# IN THIS BLOODY FILE!
#
# https://packaging.ubuntu.com/html/getting-set-up.html#configure-your-shell
export DEBFULLNAME="Andrei Jiroh Halili"
# Temporary Gmail address for devel stuff, even through my longer email one is, well,
# on my public GPG key btw, so YOLO it.
export DEBEMAIL="ajhalili2006@gmail.com"
# Customized PATH + Jetbrains Toolbox
export PATH="$DOTFILES_BIN:$HOME/go/bin:$HOME/.local/bin:$GOPATH/bin:$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
##########################################################################################
# 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
##########################################################################################
# import aliases to shell too
. "$HOME/.config/bash/aliases"