Simplify Symlinks management with GNU Stow
I came across this great video on youtube which talks about managing your dotfiles
with GNU stow
.
Though I am very happy with how I manage my dotfiles, the introduction to GNU Stow
is still something interesting.
I used GNU stow
to manage some scripts for my distributed systems project. Below is the copy pasted version from the project README.
Debug script Management with GNU Stow
The scripts that we are using to pretty print the output are pushed to the path/to/project/scripts/bin
directory.
We are going to use GNU Stow to push these to $HOME/bin
directory so that we can use them in terminal commands (This is assuming $HOME/bin
directory is in your PATH
)
-
Install GNU Stow (if not already installed):
brew install stow
-
Create Symlinks: Navigate to your project directory and run below :
cd path/to/project
# This links scripts from scripts/bin to $HOME/bin.
stow --target=$HOME scripts
# Verify symlinks are created
ls -l $HOME/bin