Skip to content

Commit

Permalink
helpers.*sh: Add reindex-localrepo convenience function
Browse files Browse the repository at this point in the history
**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 <[email protected]>
  • Loading branch information
ermo committed Jan 20, 2024
1 parent f1c8f3e commit 32b4cae
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/Scripts/helpers.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions common/Scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions common/Scripts/helpers.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 32b4cae

Please sign in to comment.