Last active
March 13, 2024 19:16
-
-
Save LevitatingBusinessMan/3f445b07b956d7c432721710e13e7ad9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
set packages (paclist core | cut -f1 -d' ') | |
set --erase IFS | |
set parallel 10 | |
set mirror 'http:\/\/ftp.snt.utwente.nl\/pub\/os\/linux\/archlinux\/$repo\/os\/$arch' | |
# setup the config | |
set config (cat pacman.conf | sed \ | |
-e "s/Include = \/etc\/pacman.d\/mirrorlist/Server = $mirror/" \ | |
-e "s/\#ParallelDownloads = 5/ParallelDownloads = $parallel/" | |
) | |
echo Testing with $parallel parallel and using $mirror | |
mkdir -p cache | |
time sudo build/pacman -S --noconfirm --downloadonly --config (echo $config | psub) --cache ./cache $packages | |
sudo rm cache/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment