Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added scripts, Makefile, vimrc config, and bashrc customizations #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
linuxsetup.log
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.SILENT:

# Install stuff for linux
linux: clean
./bin/linux.sh
# Clean up install
clean:
./bin/cleanup.sh
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ These are my dotfile configuration files for different software in Bash.
This is my custom .vimrc configuration for Vim.
## .bashrc
This is my custom .bashrc configuration for Bash.
## Cleanup
This cleans the files so that it can be run with a clean slate.
4 changes: 4 additions & 0 deletions bin/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
rm ~/.vimrc
sed -s "source ~/.dotfiles/bashrc_custom" ~/.bashrc
rm ~/.TRASH
12 changes: 12 additions & 0 deletions bin/linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# If statement checks to see if operating system is linux
if ($OSTYPE == "Linux" ); then
mkdir -p ~/.TRASH
mv ~/.vimrc ~/.bup_vimrc
echo".vimrc has been renamed to .bup_vimrc!"
cat ./etc/vimrc > ~/.vimrc
echo "source ~/.dotfiles/etc/bashrc_customr" >> ~/.bashrc
else
echo "Error Linux is not the operating system" >> linuxsetup.log
exit
fi
34 changes: 34 additions & 0 deletions etc/bashrc_custom
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
##########
# Environment Variables
##########
# Look in current directory for executables
export PATH=$PATH:.
##########
# Aliases
##########
alias cdd="cd .."
alias lsa="ls -A"
alias lsl="ls -l"
alias lsal="ls -Al"
alias targz=targzfunc
alias untar=untarfunc
# Edit the ??? in this line
alias cselab="ssh -p 222 username@129.252.130.???"
# Trash alias instead of using rm
alias trash="mv -t ~/.TRASH"
alias rmtrash="rm -rf ~/.TRASH/*"
##########
# Functions
##########
# Function to tar -zcvf a directory
function targzfunc() {
VAR=$1;
VAR=${VAR%/};
tar -zcvf "$VAR.tar.gz" ./"$VAR"
}
# Function to tar -xvf a .tar.gz file.
function untarfunc() {
VAR=$1
VAR=${VAR}
tar -xvf ./"$VAR"
}
6 changes: 6 additions & 0 deletions etc/vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
syntax on
set number
set autoindent
set ruler
color elflord
autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0