Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-03-09 17:22:59 -06:00
parent 3ff0f64a6b
commit 515065ce75
4 changed files with 43 additions and 42 deletions

View File

@ -1,9 +1,13 @@
setup:
all:
echo is this a new install?
apt:
setup-bash:
echo ${WIT_USER}
cat bashrc/.bashrc >> ~/.bashrc
setup-apt:
mv /etc/apt/sources.list /root/
echo "deb http://mirrors.wit.org/debian/ sid main contrib non-free" > /etc/apt/sources.list
echo "deb http://mirrors.wit.com/debian/ sid main contrib non-free" > /etc/apt/sources.list
apt update
apt install -y bash_completion wget
apt install -y lsof bash-completion libpam-systemd dbus rbd-nbd golang-go git screen vim ethstatus ethtool sysstat \
@ -13,7 +17,7 @@ apt:
apt autoremove
service ssh start
set-date:
setup-date:
@# you need this if your hardware clock is fucked up
@# I need to check to see if the clock is before this date, if so, then it's not working
wget --method=HEAD -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f 4-9

View File

@ -1,39 +1,3 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
if [ -f ~/.config/wit/bashrc/.wit ] && ! shopt -oq posix; then
. ~/.config/wit/bashrc/.wit
fi
# read in custom bash settings if you want
#if [ -f ~/jcarr/bashrc/.jcarr ] && ! shopt -oq posix; then
# . ~/jcarr/bashrc/.jcarr
#fi
# read in custom bash settings if you want
case "$LC_USER" in
jcarr2)
. ~/jcarr/bashrc/.jcarr
;;
*)
if [ -f ~/$LC_USER/bashrc/.$LC_USER ] && ! shopt -oq posix; then
. ~/$LC_USER/bashrc/.$LC_USER
fi
;;
esac

33
bashrc/.wit Normal file
View File

@ -0,0 +1,33 @@
# set -x
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
export WIT_BASH=true
export WIT_USER=$LC_USER
if [ "x$WIT_USER" == "x" ]; then
export WIT_USER=$USER
fi
# read in custom bash settings if you want
#if [ -f ~/jcarr/bashrc/.jcarr ] && ! shopt -oq posix; then
# . ~/jcarr/bashrc/.jcarr
#fi
# read in custom bash settings if you want
case "$WIT_USER" in
jcarr2)
. ~/jcarr/bashrc/.jcarr
;;
*)
if [ -f ~/$WIT_USER/bashrc/.$WIT_USER ] && ! shopt -oq posix; then
. ~/$WIT_USER/bashrc/.$WIT_USER
fi
;;
esac

View File