From 515065ce756472ccd2a21c27e58f1c346f5e016f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 9 Mar 2023 17:22:59 -0600 Subject: [PATCH] hmm Signed-off-by: Jeff Carr --- Makefile | 12 ++++++++---- bashrc/.bashrc | 40 ++-------------------------------------- bashrc/.wit | 33 +++++++++++++++++++++++++++++++++ bashrc/vimrc => vimrc | 0 4 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 bashrc/.wit rename bashrc/vimrc => vimrc (100%) diff --git a/Makefile b/Makefile index 8dc9e71..efa57c6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/bashrc/.bashrc b/bashrc/.bashrc index 857f9de..82b6b0f 100644 --- a/bashrc/.bashrc +++ b/bashrc/.bashrc @@ -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 diff --git a/bashrc/.wit b/bashrc/.wit new file mode 100644 index 0000000..275a7d2 --- /dev/null +++ b/bashrc/.wit @@ -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 diff --git a/bashrc/vimrc b/vimrc similarity index 100% rename from bashrc/vimrc rename to vimrc