This Bash script automates the process of installing packages, cloning a my .dotfiles repository, and using GNU Stow to manage configuration files. It interacts with the user to decide which packages to install and handles the setup of configuration files in the user's .config directory.
This script id based on my necessities so adjust the provided lists and repository URL to suit your personal configuration.
Before running this script, ensure you have the following tools installed on your system:
stowgit
The script relies on three text files:
pkg_list.txt: A list of packages that the script will ask the user about installing.pkg_install.txt: A temporary file used to store the list of packages the user wants to install.stow_files.txt: A list of configuration directories that will be managed by stow.
-
Prepare the Package List: Create a
pkg_list.txtfile with a list of packages you might want to install, one per line. -
Prepare the Stow Files List: Create a
stow_files.txtfile with a list of configuration directories to manage withstow, one per line. -
Run the Script: Execute the script in a terminal.
chmod +x your_script.sh ./your_script.sh
-
Follow Prompts: The script will prompt you to confirm the installation of each package and to proceed with the installation process.
tmux
code
vim
tmux
zsh
- Ensure that
pamacis installed and configured properly, or replacepamac installwith your preferred package manager command in the script. - The script assumes a Unix-like environment with a home directory structure.
- stow or git not found: Make sure
stowandgitare installed and accessible in your$PATH. - Permissions Issues: Ensure you have the necessary permissions to install packages and write to the directories involved.
- Customizing for Different Package Managers: Modify the package installation command if you are using a different package manager (e.g.,
apt,yum,brew).