Skip to content

Commit

Permalink
Update to install script
Browse files Browse the repository at this point in the history
  • Loading branch information
jkogara committed Aug 2, 2024
1 parent 11cb080 commit f052d16
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 50 deletions.
1 change: 0 additions & 1 deletion bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ export PYSPARK_SUBMIT_ARGS='--master local[2] pyspark-shell'

export RUST_SRC_PATH=`rustc --print sysroot`/lib/rustlib/src/rust/src
. "$HOME/.cargo/env"
source "$HOME/.cargo/env"

18 changes: 9 additions & 9 deletions bashme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,16 @@ if [ -n "$POWERLIVE_DAEMON_INSTALLED" ]; then
fi

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar"
export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew"
export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin
export MANPATH="${MANPATH}:/home/linuxbrew/.linuxbrew/share/man"
export INFOPATH="${INFOPATH}:/home/linuxbrew/.linuxbrew/share/info"
export PATH=$PATH:/home/jkogara/.local/bin
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar"
export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew"
export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin
export MANPATH="${MANPATH}:/home/linuxbrew/.linuxbrew/share/man"
export INFOPATH="${INFOPATH}:/home/linuxbrew/.linuxbrew/share/info"
export PATH=$PATH:/home/jkogara/.local/bin
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
elif [[ "$OSTYPE" == "darwin"* ]]; then
export PATH="/opt/homebrew/Cellar/pyenv-virtualenv/1.2.1/shims:${PATH}"
export PYENV_VIRTUALENV_INIT=1
Expand Down
52 changes: 26 additions & 26 deletions bashrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#!/usr/bin/env bash

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
source /etc/profile.d/vte.sh
source /etc/profile.d/vte.sh
elif [[ "$OSTYPE" == "darwin"* ]]; then
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=/opt/homebrew/bin/chromium
eval "$(/opt/homebrew/bin/brew shellenv)"

BREW_BIN="/usr/local/bin/brew"
if [ -f "/opt/homebrew/bin/brew" ]; then
BREW_BIN="/opt/homebrew/bin/brew"
fi

if type "${BREW_BIN}" &>/dev/null; then
HOMEBREW_PREFIX=$($BREW_BIN --prefix)
NEWPATH=${PATH}
# gnubin; gnuman
for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnubin; do NEWPATH=$d:$NEWPATH; done
# I actually like that man grep gives the BSD grep man page
#for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnuman; do export MANPATH=$d:$MANPATH; done
export PATH=$(echo ${NEWPATH} | tr ':' '\n' | cat -n | sort -uk2 | sort -n | cut -f2- | xargs | tr ' ' ':')
fi
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
export PUPPETEER_EXECUTABLE_PATH=/opt/homebrew/bin/chromium
eval "$(/opt/homebrew/bin/brew shellenv)"

BREW_BIN="/usr/local/bin/brew"
if [ -f "/opt/homebrew/bin/brew" ]; then
BREW_BIN="/opt/homebrew/bin/brew"
fi

if type "${BREW_BIN}" &>/dev/null; then
HOMEBREW_PREFIX=$($BREW_BIN --prefix)
NEWPATH=${PATH}
# gnubin; gnuman
for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnubin; do NEWPATH=$d:$NEWPATH; done
# I actually like that man grep gives the BSD grep man page
#for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnuman; do export MANPATH=$d:$MANPATH; done
export PATH=$(echo ${NEWPATH} | tr ':' '\n' | cat -n | sort -uk2 | sort -n | cut -f2- | xargs | tr ' ' ':')
fi
fi

##### DEBUG BASH
Expand Down Expand Up @@ -77,7 +77,7 @@ source ~/.bashme.sh

###-tns-completion-start-###
if [ -f $HOME/.tnsrc ]; then
source $HOME/.tnsrc
source $HOME/.tnsrc
fi

source <(kubectl completion bash)
Expand All @@ -102,13 +102,13 @@ esac
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/bin/conda' 'shell.bash' 'hook' 2>/dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
eval "$__conda_setup"
else
if [ -f "/usr/etc/profile.d/conda.sh" ]; then
. "/usr/etc/profile.d/conda.sh"
else
export PATH="/usr/bin:$PATH"
fi
if [ -f "/usr/etc/profile.d/conda.sh" ]; then
. "/usr/etc/profile.d/conda.sh"
else
export PATH="/usr/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
39 changes: 25 additions & 14 deletions install
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
dir=~/dotfiles
olddir=~/dotfiles_old
files=`ls $dir | grep -E -v install`

files=$(ls $dir | grep -E -v install | grep -E -v config)
config_files=$(ls -d $dir/config/*)

echo "Creating $olddir for backup of any existing dotfiles in ~"
mkdir -p $olddir
Expand All @@ -13,16 +13,27 @@ cd $dir
echo "...done"

for file in $files; do
#if [ -a ~/.$file ]
#then
# echo "Moving .$file from ~ to $olddir"
# mv ~/.$file ~/dotfiles_old/
#fi
if [ -a ~/.$file ]
then
echo "Symlink already exists"
else
echo "Creating symlink to $file in home directory."
ln -s $dir/$file ~/.$file
fi
if [ -a ~/.$file ]; then
echo "Moving .$file from ~ to $olddir"
mv ~/.$file ~/dotfiles_old/
fi
if [ -a ~/.$file ]; then
echo "Symlink already exists"
else
echo "Creating symlink to $file in home directory."
ln -s $dir/$file ~/.$file
fi
done

for file in $config_files; do
if [ -a ~/.$file ]; then
echo "Moving .$file from ~ to $olddir"
mv ~/.$file ~/dotfiles_old/
fi
if [ -a ~/.$file ]; then
echo "Symlink already exists"
else
echo "Creating symlink to $file in home directory."
ln -s $file ~/.config/$(basename $file)
fi
done

0 comments on commit f052d16

Please sign in to comment.