Created
November 17, 2024 07:43
-
-
Save dardo82/99db8e7a2e5b5286178f55711f6b6021 to your computer and use it in GitHub Desktop.
DL files by name from Arch PKG repo
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
#!/bin/zsh | |
mkdir -p $1; cd $1; pwd | |
PKG_LIST=$(paru -F -x ".*$1(-.[a-z]+)?(.sh|$)" | \ | |
awk -F '/| ' "/^[a-z]/"'{print $2}') | |
for PKG in $PKG_LIST; do | |
paru -S -d -d -w $PKG | |
mv -v $PKG_DIR/$PKG-* . | |
tar --one-top-level --wildcards --zstd -x \*$1\* -v -f $PKG-* | |
mv -v **/*$1* $1-$PKG | |
rm -v $PKG-* | |
ls -l $1-* | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment