mirror of
https://github.com/getsolus/packages.git
synced 2025-04-26 12:50:29 +03:00
helpers.*sh: Add reindex-localrepo convenience function
**Summary** We have no convenient way to re-index our local repo. Since it is quite a long command, why not add a convenience function to do it correctly that is maintained by Solus Staff? This commit does just that for all helper scripts. Signed-off-by: Rune Morling <ermo@serpentos.com>
This commit is contained in:
parent
f1c8f3ef52
commit
32b4caeafd
3 changed files with 17 additions and 0 deletions
|
@ -19,6 +19,11 @@ function gotopkg -a package -d "Go to a package directory"
|
|||
cd (__solus_toplevel)/packages/*/$package
|
||||
end
|
||||
|
||||
function reindex-localrepo -d "Re-index the local repo and update eopkg's cache"
|
||||
sudo eopkg index --skip-signing /var/lib/solbuild/local/ --output /var/lib/solbuild/local/eopkg-index.xml && \
|
||||
sudo eopkg update-repo
|
||||
end
|
||||
|
||||
function whatprovides -a library -d "Show packages that provide a certain library"
|
||||
path basename (path dirname (grep $library (__solus_toplevel)/packages/*/*/abi_libs))
|
||||
end
|
||||
|
|
|
@ -18,6 +18,12 @@ function gotopkg() {
|
|||
cd "$(git rev-parse --show-toplevel)"/packages/*/"$1" || return 1
|
||||
}
|
||||
|
||||
# Re-index the local repo and update eopkg's cache
|
||||
function reindex-localrepo() {
|
||||
sudo eopkg index --skip-signing /var/lib/solbuild/local/ --output /var/lib/solbuild/local/eopkg-index.xml && \
|
||||
sudo eopkg update-repo
|
||||
}
|
||||
|
||||
# What provides a lib
|
||||
function whatprovides() {
|
||||
grep "$1" "$(git rev-parse --show-toplevel)"/packages/*/*/abi_libs
|
||||
|
|
|
@ -22,6 +22,12 @@ function gotopkg() {
|
|||
cd $(git rev-parse --show-toplevel)/packages/*/$1
|
||||
}
|
||||
|
||||
# Re-index the local repo and update eopkg's cache
|
||||
function reindex-localrepo() {
|
||||
sudo eopkg index --skip-signing /var/lib/solbuild/local/ --output /var/lib/solbuild/local/eopkg-index.xml && \
|
||||
sudo eopkg update-repo
|
||||
}
|
||||
|
||||
# What provides a lib
|
||||
function whatprovides() {
|
||||
grep $1 $(git rev-parse --show-toplevel)/packages/*/*/abi_libs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue