torrent/hero_shell.sh

47 lines
1.4 KiB
Bash
Raw Normal View History

2024-01-13 10:01:54 +00:00
#!/bin/bash
set -e
clear
export BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
export NU_CONFIG_DIR=${BASE}/nushell/config
# 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."
# 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}
nu --config nushell/config/config.nu --env-config nushell/config/env.nu -e 'source nushell/load.nu; $env.PATH = (paths_nix)'