Created
January 16, 2020 17:57
-
-
Save andrewwoods/bbb4eacf3d56a85be90c70f03f24221e to your computer and use it in GitHub Desktop.
Bash function to setup new user account files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Whenever you get a new computer, you need to create some files and | |
# directories to get things configured. No need to load this in your .bashrc | |
# file. Just source this when you need it. Call it like this: | |
# | |
# $ source new-account-setup.bash | |
# $ cd ~ && new_account_setup | |
# | |
function new_account_setup { | |
# Create Bash directory structure | |
mkdir -p bash/{aliases,data,functions} | |
touch bash/bashrc | |
touch bash/profile | |
touch bash/arrays.bash | |
# Create Git directory structure | |
mkdir -p git | |
touch git/{config,ignore} | |
# Create Vim directory structure | |
mkdir -p vim/{functions,themes,templates} | |
# Create dev directory structure | |
mkdir -p bin config docs etc lib | |
# Create business directory structure | |
mkdir -p projects photos resources | |
# Load library files in main files | |
echo "source bash/arrays.bash" >> .bashrc | |
echo "source bash/bashrc" >> .bashrc | |
echo "source bash/profile" >> .bash_profile | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment