Skip to content

Instantly share code, notes, and snippets.

@LevitatingBusinessMan
Last active March 13, 2024 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LevitatingBusinessMan/3f445b07b956d7c432721710e13e7ad9 to your computer and use it in GitHub Desktop.
Save LevitatingBusinessMan/3f445b07b956d7c432721710e13e7ad9 to your computer and use it in GitHub Desktop.
#!/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