fix bugs host and network install functions

master
David Kebler 2024-02-21 14:46:44 -08:00
parent 3eaf9e38be
commit 56e758c0f9
2 changed files with 6 additions and 5 deletions

View File

@ -134,6 +134,7 @@ mkrfilename () {
sshtest () {
env | grep BASH
echo running on machine: $(hostnamectl hostname)
echo as user:home $(whoami):$HOME
echo argument1 $1

View File

@ -55,7 +55,7 @@ install_shell_base () {
install_shell_host () {
if [[ $BASH_SHELL_HOST ]]; then
if [[ -d $BASH_SHELL_HOST/modules ]]; then
echo appears that UCI shell host repo is already installed at $BASH_SHELL_HOST
echo upgrade instead using: 'module_load uci-shell-install; update_shell_host'
return 1
@ -66,10 +66,10 @@ install_shell_host () {
fi
export BASH_SHELL_HOST=$(dirname $BASH_SHELL_BASE)/host
if mkdir -p $BASH_SHELL_HOST; then
if git clone $UCI_GIT_SERVER_URL/shell-host.git $BASH_SHELL_HOST; then
if git clone $BASH_SHELL_GIT_URL/shell-host.git $BASH_SHELL_HOST; then
chown -R ${1:-$USER}:${1:-$USER} $BASH_SHELL_HOST
chmod -R +r $BASH_SHELL_HOST
export $BASH_SHELL_HOSTNAME=$(dirname $BASH_SHELL_BASE)/$(hostnamectl hostname)
export BASH_SHELL_HOSTNAME=$(dirname $BASH_SHELL_BASE)/$(hostnamectl hostname)
mkdir -p $BASH_SHELL_HOSTNAME/load
echo note: use $BASH_SHELL_HOSTNAME/load directory to load modules and other stuff from at prompt.
fi
@ -77,7 +77,7 @@ install_shell_host () {
}
install_shell_network () {
if [[ $BASH_SHELL_NETWORK ]]; then
if [[ -d $BASH_SHELL_NETWORK/modules ]]; then
echo appears that UCI shell network repo is already installed at $BASH_SHELL_NETWORK
echo upgrade instead using: 'module_load uci-shell-install; update_shell_network'
return 1
@ -88,7 +88,7 @@ install_shell_network () {
fi
export BASH_SHELL_NETWORK=$(dirname $BASH_SHELL_BASE)/network
if mkdir -p $BASH_SHELL_NETWORK; then
if git clone $UCI_GIT_SERVER_URL/shell-network.git $BASH_SHELL_NETWORK; then
if git clone $BASH_SHELL_GIT_URL/shell-network.git $BASH_SHELL_NETWORK; then
chown -R ${1:-$USER}:${1:-$USER} $BASH_SHELL_NETWORK
chmod -R +r $BASH_SHELL_NETWORK
fi