sshtunnel/bin/scripts/install-local.sh
2025-05-23 15:08:44 +02:00

19 lines
620 B
Bash
Executable File

#!/usr/bin/env bash
source bin/helpers/func.sh
# Create any missing directories/files
touch ~/.bash_completion
mkdir -p $HOME/.local/bin/
# Symbolically link binaries
ln -sf $(pwd)/bin/sshtunnel $HOME/.local/bin/sshtunnel
ln -sf $(pwd)/bin/sshtunnel-completion.bash $HOME/.local/bin/sshtunnel-completion.bash
# Add completion to bash_completion for sshtunnel
sed -i '/sshtunnel/d' ~/.bash_completion
echo "source $HOME/.local/bin/sshtunnel-completion.bash" >> ~/.bash_completion
printfe "%s\n" "green" "Local installation complete. Binary has been installed to $HOME/.local/bin/sshtunnel"
source ~/.bash_completion