mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 04:49:34 -07:00
Clean up usage and add --help
This commit is contained in:
parent
8cd15c2338
commit
32b19dfbcb
1 changed files with 7 additions and 5 deletions
|
@ -98,14 +98,15 @@ usage() {
|
|||
echo " -v Show additional debug information"
|
||||
echo ""
|
||||
echo " Long Argument Options:"
|
||||
echo " --check-update Check for new version of plex only"
|
||||
echo " --config <path/to/config/file> Configuration file to use"
|
||||
echo " --dldir <path/to/download/dir> Download directory to use"
|
||||
echo " --email <plex.tv email> Plex.TV email address"
|
||||
echo " --pass <plex.tv password> Plex.TV password"
|
||||
echo " --server <Plex server address> Address of Plex Server"
|
||||
echo " --port <Plex server port> Port for Plex Server. Used with --server"
|
||||
echo " --help This help"
|
||||
echo " --notify-success Set exit code 10 if update is available/installed"
|
||||
echo " --check-update Check for new version of plex only"
|
||||
echo " --pass <plex.tv password> Plex.TV password"
|
||||
echo " --port <Plex server port> Port for Plex Server. Used with --server"
|
||||
echo " --server <Plex server address> Address of Plex Server"
|
||||
echo ""
|
||||
exit 0
|
||||
}
|
||||
|
@ -125,7 +126,7 @@ trap cleanup EXIT
|
|||
|
||||
# Parse commandline
|
||||
ALLARGS=( "$@" )
|
||||
optstring="-o acCdfFhlpPqrSsuUv -l config:,dldir:,email:,pass:,server:,port:,notify-success,check-update"
|
||||
optstring="-o acCdfFhlpPqrSsuUv -l config:,dldir:,email:,pass:,server:,port:,notify-success,check-update,help"
|
||||
GETOPTRES=$(getopt $optstring -- "$@")
|
||||
if [ $? -eq 1 ]; then
|
||||
exit 1
|
||||
|
@ -183,6 +184,7 @@ do
|
|||
(--pass) shift; PASS=$(trimQuotes ${1});;
|
||||
(--server) shift; PLEXSERVER=$(trimQuotes ${1});;
|
||||
(--port) shift; PLEXPORT=$(trimQuotes ${1});;
|
||||
(--help) usage;;
|
||||
|
||||
(--notify-success) NOTIFY=yes;;
|
||||
(--check-update) CHECKONLY=yes;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue