use Hentai through PATH
This commit is contained in:
@ -8,9 +8,9 @@ NO_COLOR="\033[0m" # Text Reset
|
|||||||
[[ -z $1 ]] && exit 1
|
[[ -z $1 ]] && exit 1
|
||||||
|
|
||||||
if [[ -z $2 ]]; then
|
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
|
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
|
fi
|
||||||
|
|
||||||
echo "$output"
|
echo "$output"
|
||||||
|
@ -54,7 +54,7 @@ if [[ -f $SUCCESS_FILE ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -f $IN_FILE ]] && rm $IN_FILE
|
[[ -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
|
if [[ $(echo $?) -ne 0 ]]; then
|
||||||
echo -e "${IRED}Hentai failed to execute properly${NO_COLOR}"
|
echo -e "${IRED}Hentai failed to execute properly${NO_COLOR}"
|
||||||
|
Reference in New Issue
Block a user