2021-10-29 snapshot

This commit is contained in:
Jeremy Wall 2021-10-29 15:24:03 -04:00
parent 3ad183dc59
commit fb7dcb01da
3 changed files with 18 additions and 16 deletions

View File

@ -103,17 +103,17 @@ function get_cabal_depends() {
} }
function insert_path_element() { function insert_path_element() {
remove_element_from_var $1 PATH remove_element_from_var "$1" PATH
insert_element_into_var $1 PATH insert_element_into_var "$1" PATH
} }
function insert_path_element_before() { function insert_path_element_before() {
remove_element_from_var $1 PATH remove_element_from_var "$1" PATH
insert_element_at_front_of_var $1 PATH insert_element_at_front_of_var "$1" PATH
} }
function remove_path_element() { function remove_path_element() {
remove_element_from_var $1 PATH remove_element_from_var "$1" PATH
} }
function insert_element_at_front_of_var () { function insert_element_at_front_of_var () {
@ -146,8 +146,9 @@ function remove_element_from_var() {
eval varcontents=\$"$2" eval varcontents=\$"$2"
eval varname="$2" eval varname="$2"
newcomp="$1" newcomp="$1"
if echo "$varcontents" | grep "$newcomp:" >> /dev/null; then if echo "${varcontents}" | grep "${newcomp}:" >> /dev/null; then
export $varname="`echo $varcontents | sed s%$newcomp:%%`" newvarcontents="$(echo "${varcontents}" | sed "s%${newcomp}:%%")"
export $varname="${newvarcontents}"
elif [[ "$varcontents" == "$newcomp" ]] ; then elif [[ "$varcontents" == "$newcomp" ]] ; then
unset $varname unset $varname
fi fi

View File

@ -22,6 +22,7 @@ if [ -d "/opt/brew" ]; then # setup brew cgo flags so that it can find brew libs
fi fi
insert_path_element_before /Users/jwall/Library/Python/3.7/bin insert_path_element_before /Applications/Julia-1.6.app/Contents/Resources/julia/bin
insert_path_element_before "/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
fi # end darwin module fi # end darwin module

View File

@ -30,14 +30,14 @@ touch ~/.hgauth
rm -f ~/restore.sh rm -f ~/restore.sh
# setup my hg cacerts # setup my hg cacerts
openssl req -new -x509 \ #openssl req -new -x509 \
-nodes \ # -nodes \
-extensions v3_ca \ # -extensions v3_ca \
-keyout /dev/null \ # -keyout /dev/null \
-out dummycert.pem \ # -out dummycert.pem \
-subj "C=US/ST=Illinois/L=Chicago/O=Marzhillstudios/CN=jeremy.marzhillstudios.com" \ # -subj "C=US/ST=Illinois/L=Chicago/O=Marzhillstudios/CN=jeremy.marzhillstudios.com" \
-days 3650 # -days 3650
sudo mv dummycert.pem /etc/hg-dummy-cert.pem #sudo mv dummycert.pem /etc/hg-dummy-cert.pem
# essential libs # essential libs