This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/true | |
# /etc/profile | |
if ${BASH_VERSION+\:} \false; then | |
[[ -o xtrace && -t /dev/fd/2 ]] && exec {BASH_XTRACEFD}>&2 | |
\shopt -u assoc_expand_once xpg_echo localvar_unset | |
\shopt -s extglob lastpipe globstar expand_aliases hostcomplete histappend checkwinsize cmdhist interactive_comments lithist no_empty_cmd_completion | |
# Wrapper to undefine a visible local variable, even in the current stack frame. Bash-only | |
function unset2 { command -- unset "$@"; } | |
(( BASH_VERSINFO[0] <= 5 && BASH_VERSINFO[1] <=2 )) && typeset -gx BASH_COMPAT=51 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ins)root@ormaaj-laptop (3852812) /home/ormaaj # PATH=$(readlink -sne ~ormaaj/doc/programs/portage/bin):${PATH##+(:)} PYTHONPATH=$(readlink -sne ~ormaaj/doc/programs/portage/lib):${PYTHONPATH##+(:)} NOLTO= NOGRAPHITE= NOGRAPHITE2= emerge -j 1 -bav dev-lang/python | |
These are the packages that would be merged, in order: | |
Calculating dependencies... done! | |
[ebuild R ] dev-lang/python [3.11.0_beta4-r2:3.11::gentoo] USE="bluetooth examples gdbm ncurses readline sqlite ssl -build -hardened -libedit -lto -pgo -test -tk -verify-sig -wininst" 0 KiB | |
Total: 1 package (1 reinstall), Size of downloads: 0 KiB | |
Would you like to merge these packages? [Yes/No] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setupGpgAgent { | |
# gpg-agent uses .gnupg but will not create the directory itself for new users. | |
if ! { [[ -d ~/.gnupg ]] || mkdir -p -- ~/.gnupg; }; then | |
printf 'bashrc: %s\n' 'No ~/.gnupg directory exists and failed to create it.' >&2 | |
return 0 | |
fi | |
if [[ -t 0 ]] && { GPG_TTY=$(readlink -sne /dev/fd/0) || GPG_TTY=$(tty); }; then | |
export GPG_TTY | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setupDirColors { | |
if [[ ${FUNCNAME[0]} == "${FUNCNAME[1]}" ]]; then | |
typeset -n LS_COLORS=$1 | |
typeset dirc | |
if dirc=$("$(type -P dircolors 2>/dev/null)" -b); then | |
alias export=:; eval "$dirc"; unalias export | |
fi | |
else | |
typeset colors ret | |
if ! shopt -q expand_aliases; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ ${KSH_VERSION+${!KSH_VERSION}} == .sh.version ]]; then | |
typeset -n FUNCNAME=.sh.fun | |
if builtin pids 2>/dev/null; then | |
function BASHPID.get { .sh.value=$(pids -f '%(pid)d'); } | |
elif [[ -r /proc/self/stat ]]; then | |
function BASHPID.get { read -r .sh.value _ </proc/self/stat; } | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
shopt -s extglob lastpipe | |
shopt -u assoc_expand_once | |
function xinitrc_main { | |
typeset myRootPath | |
if myRootPath=$(dirname "$(readlink -sne -- "${BASH_SOURCE[0]}")") && [[ -d $myRootPath ]]; then | |
source "${myRootPath}/shell/functions" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shopt -s lastpipe extglob globstar | |
shopt -u assoc_expand_once | |
function initializeBuiltins { | |
typeset -a a | |
typeset x y z | |
set +m | |
typeset libdir=${fsRoot%%+(/)}/usr/lib64 | |
[[ -d ${libdir}/bash ]] || libdir=${rootPath%%+(/)}/lib64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
typeset -T FileComparer=( | |
typeset src dst | |
typeset -a mv diff rm | |
compound _=( | |
_Bool unpackComplete=false | |
_Bool scanComplete=false | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stupid game. | |
# minecraft -c | -s [ -p ] | |
function minecraft { | |
typeset \ | |
jvm=${JAVA_HOME}/bin/java \ | |
worldPath=~/doc/mcdata2 \ | |
serverPath=~/doc/programs/ServerJarStorage/Release\ 1.8/minecraft_server.jar \ | |
clientPath=~/doc/programs/Minecraft.jar | |
typeset opt OPTARG OPTIND OPTERR=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quickly adds world read permissions to files and world read/write permissions | |
# to directories recursively. «-u user[:group]» will additionally chmod files | |
# and directories recursively. | |
function fixperms { | |
typeset -a paths | |
typeset chownUserGroup | |
until ${1+'false'}; do | |
case $1 in | |
-u) |