Skip to content

Config

Set up user configurations including Git configurations (name and email), along with configuring several user preferences such as .aliases, .bash_aliases, and other configurations. It provides options for interactive input or automated setup.

Basic usage:

config/install.sh

Command Line Arguments

The following section parses command-line arguments using getopts:

  • -y : Enables non-interactive mode by automatically accepting default values.
  • -e <email> : Sets the Git user email.
  • -n <name> : Sets the Git user name.

What this script does

Git User Name and Email Setup

The script sets up the Git user name and email in $HOME/.gitconfig.user``. If the name or email is not provided, the script prompts the user for it. The provided name is stored in.gitconfig.user` to be used globally in Git.

If left blank, the script will skip this step.

Configure Aliases

The script sets up the .aliases directory. It creates a backup of the existing .aliases if present, and then links the new .aliases from the repository to the user's home directory.

Configure Bash Aliases

The script sets up .bash_aliases. It backs up the existing .bash_aliases and then creates a symbolic link to the new one from the repository.

Configure Gitconfig

The script sets up .gitconfig. It creates a backup of the existing .gitconfig and then creates a symbolic link to the new one from the repository.

Configure User Preferences in .config

The script sets up user preferences in the .config directory. It creates symbolic links to individual configuration files in $HOME/.config.