mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 22:27:01 +01:00
The five package-installation functions move to lib/packages.sh; main.sh keeps the top-level flow and sources the library after `set -e`. The first attempt sliced by line range and was thrown away. This file interleaves top-level commands - sudo -v, git config, the cp of makepkg.conf and pacman.conf - between its function definitions, so a range slice swept them into the library, where they would have run at source time and in the wrong order. Sourcing that version blocked on a sudo password prompt, which is how it was caught. The rebuild extracts function blocks by brace counting and leaves every other line exactly where it was. Verified with the new shfmt harness (all 5 functions verbatim), by a structural comparison of the top-level flow showing exactly one line added and none missing, and by sourcing the library to confirm it defines all five functions with no side effects. The script itself was NOT run: it does `sudo pacman -Sy`, overwrites /etc/makepkg.conf and /etc/pacman.conf, and installs AUR packages. Over-cap files 32 -> 31. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| lib | ||
| aur_packages.txt | ||
| detect_gpu_and_install.sh | ||
| detect_gpu.sh | ||
| install_amd_driver.sh | ||
| install_intel_driver.sh | ||
| install_nvidia_driver.sh | ||
| main.sh | ||
| makepkg.conf | ||
| mkinitcpio.conf | ||
| mpv.conf | ||
| packages.txt | ||
| pacman_packages.txt | ||
| pacman.conf | ||
| README.md | ||
Package Lists
This directory contains package lists for the fresh install script:
pacman_packages.txt- List of packages to install via pacmanaur_packages.txt- List of AUR packages with their repository URLs
Format
pacman_packages.txt
One package name per line:
package1
package2
package3
# This is a comment and will be ignored
# Another comment
aur_packages.txt
Package name and repository URL separated by space:
package-name https://aur.archlinux.org/package-name.git
another-package https://aur.archlinux.org/another-package.git
# This is a comment and will be ignored
# Another comment
Note: Lines starting with anything other than lowercase letters (a-z) or digits (0-9) will be ignored as comments. This includes lines starting with #, spaces, uppercase letters, or special characters.
Usage
The main.sh script will automatically read from these files:
- Pacman packages will be installed via
pacman -Sy --noconfirm - AUR packages will be built and installed via the
install_from_aurfunction
Modifying Package Lists
To add or remove packages:
- Edit the appropriate
.txtfile - For AUR packages, ensure the format is correct (package-name followed by space and URL)
- You can add comments by starting lines with
#or any non-alphanumeric character - Save the file - the script will automatically pick up changes on next run
Comments
You can add comments to organize your package lists:
# Essential packages
git
vim
# Development tools
gcc
make
# Optional packages (commented out)
# some-package-i-might-want-later