These are my personal dotfiles consisting of a collection of aliases and custom scripts.
git clone https://github.com/ptrstn/dotfiles
cd dotfilesTo 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.shAlternatively, you can perform a manual installation by following these steps:
-
Copy the contents of the
bindirectory into your user-specific bin directory (create it, if it doesn't exist):mkdir -p ~/.local/bin cp -i bin/* ~/.local/bin
-
Copy the
.bash_aliasesfile to your home directory:cp -i .bash_aliases ~ -
Add the following lines at the beginning of your
.bashrcfile to check if the.bash_aliasesfile exists and to source it:if [ -f ~/.bash_aliases ]; then source ~/.bash_aliases fi
To update the scripts, simply perform a git pull and redo the installation instructions:
git pull
./setup.shYour 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$'shfmt is used to format the scripts inside this repository.
To format all the scripts, simply run:
shfmt -l -i 2 -ci -w .ShellCheck is used for static code analysis. To check all the scripts, simply run:
shellcheck -x setup.sh ./scripts/*.sh ./bin/*.shYou 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