Skip to content

Commit

Permalink
feat: if option used is --help, show help
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemaker1 committed Jun 15, 2021
1 parent 841c884 commit c425832
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yeet
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ else
echo "PRINT_LOGO=true" >> "$CONFIG_FILE_PATH"

# If there is no config yet and the operation is not 'help', definitely print the logo
if [ "$1" != "-h" ] && ! [ -z "$1" ]; then
if [ "$1" != "-h" ] && [ "$1" != "--help" ] && ! [ -z "$1" ]; then
print_logo
fi
# Then turn it off, we don't want to print again
Expand All @@ -137,7 +137,7 @@ fi
# Print out the logo, unless specified otherwise in the config (generated using command `figlet -f pagga YEET`)
if [ "$PRINT_LOGO" == "true" ]; then
# Make sure the operation is not 'help', else we will be printing the logo twice
if [ "$1" != "-h" ] && ! [ -z "$1" ]; then
if [ "$1" != "-h" ] && [ "$1" != "--help" ] && ! [ -z "$1" ]; then
print_logo
fi
fi
Expand All @@ -151,7 +151,7 @@ fi
# yeet -R <package name> - Remove the specified package(s)
# yeet -Q [options] - Run pacman -Q
# yeet <package search terms> - Search for a package and install it
if [ "$1" == "-h" ] || [ -z "$1" ]; then
if [ "$1" == "-h" ] || [ "$1" == "--help" ] || [ -z "$1" ]; then
operation="help"
elif [ "$1" == "-U" ] || [ "$1" == "-Syyu" ] || [ "$1" == "-Syu" ] || [ "$1" == "-SyyU" ] || [ "$1" == "-SyU" ] || [ "$1" == "-Syy" ] || [ "$1" == "-Sy" ] || [ "$1" == "-Suu" ] || [ "$1" == "-Su" ] || [ "$1" == "-SUU" ] || [ "$1" == "-SU" ]; then
# Update all packages
Expand Down

0 comments on commit c425832

Please sign in to comment.