mirror of
https://mau.dev/andreijiroh-dev/dotfiles.git
synced 2024-11-10 08:59:40 +00:00
Andrei Jiroh Halili
81aca31cdf
Plus, in this commit: * updated most of shell rc and then some Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
45 lines
1.5 KiB
Bash
45 lines
1.5 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
|
|
##########################################################################################
|