Skip to content

ptrstn/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI

Personal dotfiles

These are my personal dotfiles consisting of a collection of aliases and custom scripts.

Installation

git clone https://github.com/ptrstn/dotfiles
cd dotfiles

Automatic Installation

To automate the installation process, you can use the setup.sh script. This script will symbolically link the contents of the bin directory into your user-specific bin directory, which is determined from your PATH variable. It symbolically links the .bash_aliases file to your ~/.bash_aliases and sources it in your ~/.bashrc. It also safely skips the files that already exist.

chmod +x setup.sh
./setup.sh

Manual Installation

Alternatively, you can perform a manual installation by following these steps:

  1. Copy the contents of the bin directory into your user-specific bin directory (create it, if it doesn't exist):

    mkdir -p ~/.local/bin
    cp -i bin/* ~/.local/bin
  2. Copy the .bash_aliases file to your home directory:

    cp -i .bash_aliases ~
  3. Add the following lines at the beginning of your .bashrc file to check if the .bash_aliases file exists and to source it:

    if [ -f ~/.bash_aliases ]; then
       source ~/.bash_aliases
    fi

Update

To update the scripts, simply perform a git pull and redo the installation instructions:

git pull
./setup.sh

Help

User-Specific bin Path

Your user-specific bin directory is either ~/bin for most Linux distributions or ~/.local/bin for Arch Linux based distributions. If you're not sure, check your $PATH variable.

echo $PATH | tr ':' '\n' | grep -E '^/home/.+/bin$'

Reformat Scripts

shfmt is used to format the scripts inside this repository. To format all the scripts, simply run:

shfmt -l -i 2 -ci -w .

Static Analysis

ShellCheck is used for static code analysis. To check all the scripts, simply run:

shellcheck -x setup.sh ./scripts/*.sh ./bin/*.sh

Run GitHub Actions workflows locally

You can run GitHub Actions workflows locally on your own machine using a tool called act.

Act is a command-line tool that simulates the GitHub Actions runner environment on your local machine, allowing you to test and debug your workflows locally before pushing changes to your repository.

To trigger the entire workflow locally, simply run:

act

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages