Add: shell script for reinstalling packages that have missing files with pacman

This commit is contained in:
Aroy-Art 2024-06-23 15:45:53 +02:00
parent 6385b48feb
commit 6e7385ecf1
Signed by: Aroy
GPG key ID: DB9689E9391DD156
2 changed files with 22 additions and 0 deletions

View file

@ -77,6 +77,24 @@ This script echoes a bunch of 24-bit color codes to the terminal to demonstrate
---
### [reinstall-packages-with-missing-files.sh](ShellScripts/reinstall-packages-with-missing-files.sh)
Reinstall all packages with missing files
This script uses the `pacman` package manager to check for packages with
missing files. It then iterates over each package and reinstalls it using
`pacman`. The `--overwrite` flag is used to ensure that any conflicting
files are overwritten. Finally, the `--noconfirm` flag is used to avoid
confirmation prompts for each package.
> Warning: This script should be run as root.
Usage:
> Note needs to be run as root.
```Bash
./ShellScripts/reinstall-packages-with-missing-files.sh
```
### [rsync-incremental-backups.sh](ShellScripts/rsync-incremental-backups.sh)
This script performs incremental backups of the specified source directory using rsync, and it keeps a symbolic link called 'latest' pointing to the most recent backup for easy reference. The script also logs backup details in a log file with a timestamp. Make sure to replace `<input folder>` and `<output folder>` with your actual source and backup directories.

View file

@ -0,0 +1,4 @@
pacman -Qk 2>/dev/null | grep -v ' 0 missing files' | cut -d: -f1 |
while read -r package; do
pacman -S "$package" --overwrite "*" --noconfirm
done