Skip to content

Instantly share code, notes, and snippets.

@dragonauta
Last active August 29, 2015 14:19
Show Gist options
  • Save dragonauta/be7a6abb58eca4279068 to your computer and use it in GitHub Desktop.
Save dragonauta/be7a6abb58eca4279068 to your computer and use it in GitHub Desktop.
Search on Slackware repositories using slpkg tool
# This function takes first parameter ($1)
# to search on every enabled repository (on /etc/slpkg/slpkg.conf)
function slpkg-search() {
for r in $(slpkg repo-list | grep enabled | awk '{ print $1 }'); do
echo "Search in $r"
slpkg -l $r | grep -i $1
echo ""
done
}
# This function shows all packages that could be upgraded
function slpkg-updates() {
for r in $(slpkg repo-list | grep enabled | awk '{ print $1 }'); do
echo "Search updates in $r"
slpkg -c $r --upgrade
echo ""
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment