RIFUJPGJ4QAK2ISPAUV6XOH6Q34ND657QGX7TEMFFLQRQJ7KP5BQC
function require_variables
set COUNT_NOT_SET 0
for arg in $argv
if not set -q $arg
echo $arg
set COUNT_NOT_SET (math $COUNT_NOT_SET + 1)
end
end
return $COUNT_NOT_SET
end
function error_if_not_set
set NOT_SET (require_variables $argv)
set COUNT_NOT_SET $status
for arg in $NOT_SET
error_message "$arg is not set and is required"
end
return $COUNT_NOT_SET
end
function ebpresto
error_if_not_set EB_PRESTO_SERVER EB_PRESTO_USER
if test $status -ne 0
return $status
end
set PRESTO_PATH /usr/local/bin/presto
if not test -e $PRESTO_PATH
error_message "presto does not appear to be installed at $PRESTO_PATH"
end
eval $PRESTO_PATH --server $EB_PRESTO_SERVER --user $EB_PRESTO_USER $argv
end
# source private variables if exist
set -x PRIVATE_VARIABLES_FILE "$DOTFILES/fish/private_variables.fish"
test -e "$PRIVATE_VARIABLES_FILE"; and source $PRIVATE_VARIABLES_FILE
/fish/private_variables.fish