mirror of
https://mau.dev/andreijiroh-dev/dotfiles.git
synced 2024-11-10 08:59:40 +00:00
a41e28d091
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>
53 lines
1.8 KiB
Bash
53 lines
1.8 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="releases@andreijiroh.eu.org"
|
|
|
|
# Customized PATH + Jetbrains Toolbox
|
|
export PATH="$HOME/go/bin:$HOME/.local/bin:$GOPATH/bin:$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
|
|
|
|
# Hardcode timezone to PHT unless otherwise specified in ~/.env.local.
|
|
# You might need tzdata installed on Alpine per https://wiki.alpinelinux.org/wiki/Setting_the_timezone
|
|
export TZ=Asia/Manila
|
|
|
|
##########################################################################################
|
|
# 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"
|