-
-
Save bashelled/ed6bb6ba83b22eaa0c5a1c099b38f19d to your computer and use it in GitHub Desktop.
An XBPS shortcut for Void Linux
This file contains hidden or 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/bash | |
usage () { | |
echo "Usage: xbps COMMAND [OPTIONS] [PACKAGES...]" | |
echo "" | |
echo "A shortcut to xbps commands." | |
echo "" | |
echo "[-h, --help, help, blank]: Shows this help" | |
echo "[-v, --ver, --version, ver, version]: Shows your XBPS version" | |
} | |
if [[ -z "$1" || "$1" == "--help" || "$1" == "help" || "$1" == "-h" ]]; then | |
usage | |
elif [[ "$1" == "version" || "$1" == "ver" || "$1" == "-v" || "$1" == "--version" || "$1" == "--ver" ]]; then | |
xbps-query --version | |
else | |
if [[ -f /bin/xbps-$1 ]]; then | |
xbps-$1 $2 $3 $4 $5 $6 $7 | |
else | |
echo "Command $1 was not found." | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment