Add more informative message in case that paclog is not found.

Add version.
This commit is contained in:
Eduard Tolosa 2024-06-09 14:09:55 -05:00
parent bc17ff70ec
commit 63c14b2811

View file

@ -1,5 +1,6 @@
#!/usr/bin/bash
VERSION="1.0.0"
USE_PACMAN_STATIC=${USE_PACMAN_STATIC:-"false"}
install_pacman_static() {
@ -26,7 +27,7 @@ check_dependencies() {
fi
if [[ "$1" == "paclog" ]] && ! command -v paclog &>/dev/null; then
echo "paclog is not installed."
echo "paclog is not installed. Use the --pacman-db option instead or install the pacutils package."
exit 1
fi
}
@ -135,6 +136,7 @@ using_paclog() {
}
usage() {
echo "$0 v$VERSION"
echo "Usage: [ENVIRONMENT] $0 [OPTIONS]"
echo "ENVIRONMENT:"
echo "USE_PACMAN_STATIC=true $0 [OPTIONS] Use pacman-static instead of the default pacman. Useful in cases that pacman is broken. Default is false."
@ -144,7 +146,8 @@ usage() {
exit 1
}
if [[ $# -eq 0 ]]; then
# Check that we have at least 2 arguments
if [[ $# -le 1 ]]; then
usage
fi