#!/bin/bash set -e clear export BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" export NU_CONFIG_DIR=${BASE}/nushell/config export PATH=${BASE}/bin:${BASE}/v:${PATH} run_hero() { hero 2>&1 > /dev/null exit_status=$? if [ $exit_status -ne 0 ]; then echo "Failed to start Hero Cmd." echo "If you're on macOS and encountering security restrictions." echo "You can do this in System Preferences > Security & Privacy." echo "Under the Privacy tab, add the Terminal and other Apps from this Distro" echo "to the list of applications with Access." fi } run_nu() { nu -h 2>&1 > /dev/null exit_status=$? if [ $exit_status -ne 0 ]; then echo "Failed to start Nushell." echo "If you're on macOS and encountering security restrictions." echo "You can do this in System Preferences > Security & Privacy." echo "Under the Privacy tab, add the Terminal and other Apps from this Distro" echo "to the list of applications with Access." fi } run_mycelium() { mycelium -h 2>&1 > /dev/null exit_status=$? if [ $exit_status -ne 0 ]; then echo "Failed to start Nushell." echo "If you're on macOS and encountering security restrictions." echo "You can do this in System Preferences > Security & Privacy." echo "Under the Privacy tab, add the Terminal and other Apps from this Distro" echo "to the list of applications with Access." fi } run_hero run_nu run_mycelium cd ${BASE} bash