Skip to content

Commit

Permalink
fix: always show the appname on usage help for all cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
kriansa committed Jan 5, 2021
1 parent a68d4ad commit 31f0d49
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/cmds/add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkg-command "add" "Add a new package to the git repo"

function cmd::add::help {
echo "Usage: $0 add [OPTIONS] <URL> [<URL> ...]"
echo "Usage: pacom add [OPTIONS] <URL> [<URL> ...]"
echo ""
echo "Adds the package(s) to the git repository. the <URL> parameter can be any GIT URL, in the"
echo "following formats: https://, ssh:// or git://. If you want to add an AUR package, pass only"
Expand Down
4 changes: 2 additions & 2 deletions lib/cmds/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
pkg-command "build" "Build a package in the git repo"

function cmd::build::help {
echo "Usage: $0 build [OPTIONS] [<PKG> ...]"
echo "Usage: pacom build [OPTIONS] [<PKG> ...]"
echo ""
echo "Builds the specified PKGs."
echo ""
echo "Options:"
echo " -a, --all Instead of passing each separate package as argument, you can use this"
echo " to build all packages from this git repository."
echo " -i, --install After building all specified packages, install them with $0 install."
echo " -i, --install After building all specified packages, install them with pacom install."
echo " -f, --force Force building and installing a package, even if it's been built."
echo " -h, --help Show this message."
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkg-command "init" "Initialize a new Git & Pacman repository"

function cmd::init::help {
echo "Usage: $0 init"
echo "Usage: pacom init"
echo ""
echo "Initialize a new repository for usage with Pacom."
echo ""
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkg-command "install" "Install a package already present in the git repo"

function cmd::install::help {
echo "Usage: $0 install [OPTIONS] [<PKG> ...]"
echo "Usage: pacom install [OPTIONS] [<PKG> ...]"
echo ""
echo "Install the specified PKGs."
echo ""
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkg-command "list" "List packages currently managed by Pacom"

function cmd::list::help {
echo "Usage: $0 list"
echo "Usage: pacom list"
echo ""
echo "List all packages managed by Pacom, along with their built and installed versions."
echo ""
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkg-command "remove" "Uninstall and remove a package from this git repo"

function cmd::remove::help {
echo "Usage: $0 remove [OPTIONS] [<PKG> ...]"
echo "Usage: pacom remove [OPTIONS] [<PKG> ...]"
echo ""
echo "Remove the specified PKGs from both the git and the pacman repositories."
echo ""
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkg-command "update" "Update packages from their external sources"

function cmd::update::help {
echo "Usage: $0 update [OPTIONS] [<PKG> ...]"
echo "Usage: pacom update [OPTIONS] [<PKG> ...]"
echo ""
echo "Update the specified PKGs by pulling the remote git submodule."
echo ""
Expand Down
2 changes: 1 addition & 1 deletion lib/cmds/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pkg-command "upgrade" "Updates, builds and install the listed packages"

function cmd::upgrade::help {
echo "Usage: $0 upgrade [OPTIONS] [<PKG> ...]"
echo "Usage: pacom upgrade [OPTIONS] [<PKG> ...]"
echo ""
echo "Update, build and install all the specified PKGs"
echo ""
Expand Down
2 changes: 1 addition & 1 deletion lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function parseopts {
local options=$1; shift
local longopts=$1; shift

local parsed; parsed=$(getopt --options="$options" --longoptions="$longopts" --name "$0" -- "$@")
local parsed; parsed=$(getopt --options="$options" --longoptions="$longopts" --name pacom -- "$@")
test $? -ne 0 && return 2

eval set -- "$parsed"
Expand Down

0 comments on commit 31f0d49

Please sign in to comment.