use Hentai through PATH

This commit is contained in:
2025-04-20 23:10:36 +02:00
parent 732ab4be9f
commit 18c9e6bdce
2 changed files with 3 additions and 3 deletions

View File

@ -8,9 +8,9 @@ NO_COLOR="\033[0m" # Text Reset
[[ -z $1 ]] && exit 1
if [[ -z $2 ]]; then
output=$([[ $(hostname) = \s\a\t\a\n ]] && cargo run -- add_url "$1" || ./Hentai add_url "$1")
output=$(Hentai add_url "$1")
else
output=$([[ $(hostname) = \s\a\t\a\n ]] && cargo run -- add_custom_name "$1" "$2" || ./Hentai add_custom_name "$1" "$2")
output=$(Hentai add_custom_name "$1" "$2")
fi
echo "$output"

View File

@ -54,7 +54,7 @@ if [[ -f $SUCCESS_FILE ]]; then
fi
[[ -f $IN_FILE ]] && rm $IN_FILE
[[ $(hostname) = \s\a\t\a\n ]] && cargo run -- generate "$1" || ./Hentai generate "$1"
Hentai generate "$1"
if [[ $(echo $?) -ne 0 ]]; then
echo -e "${IRED}Hentai failed to execute properly${NO_COLOR}"