Compare commits
No commits in common. "140404ff4984eebcab7dbaeee0e3645777e101bc" and "5ae8dd672c7442f3cfa3a1dd12b2159caeb3892b" have entirely different histories.
140404ff49
...
5ae8dd672c
|
@ -7,10 +7,10 @@ uci_bash_shell_install () {
|
||||||
# export BASH_SHELL_BASE="$(dirname "$(cd "$(dirname "${BASH_SOURCE:-$0}")" >/dev/null 2>&1 ; pwd -P )")"
|
# export BASH_SHELL_BASE="$(dirname "$(cd "$(dirname "${BASH_SOURCE:-$0}")" >/dev/null 2>&1 ; pwd -P )")"
|
||||||
echo "Detected The UCI BASH Shell install directory: BASH_INSTALL_DIR=$install_dir"
|
echo "Detected The UCI BASH Shell install directory: BASH_INSTALL_DIR=$install_dir"
|
||||||
echo "Detected The UCI BASH Shell base directory: BASH_SHELL_BASE=$BASH_SHELL_BASE"
|
echo "Detected The UCI BASH Shell base directory: BASH_SHELL_BASE=$BASH_SHELL_BASE"
|
||||||
[[ $EUID -ne 0 ]] && ( usesudo="sudo -E" && echo $USER elevated to sudo )
|
[[ $EUID -ne 0 ]] && usesudo="sudo -m"
|
||||||
$usesudo $SHELL $install_dir/scripts/copy-etc.sh
|
$usesudo $SHELL $install_dir/scripts/copy-etc.sh
|
||||||
$usesudo $SHELL $install_dir/scripts/copy-root.sh
|
$usesudo $SHELL $install_dir/scripts/copy-root.sh
|
||||||
[[ $1 ]] && [[ $(id -u $1 2> /dev/null) ]] && $usesudo $SHELL $install_dir/scripts/copy-user.sh "$@"
|
[[ $1 ]] && [[ $(id -u $1 2> /dev/null) ]] && $usesudo -m $SHELL $install_dir/scripts/copy-user.sh "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# # if script was executed then call the function
|
# # if script was executed then call the function
|
||||||
|
|
|
@ -21,15 +21,10 @@
|
||||||
|
|
||||||
# must! be run as sudo
|
# must! be run as sudo
|
||||||
install_shell_base () {
|
install_shell_base () {
|
||||||
if [[ $1 == "-f" ]];then
|
|
||||||
shift
|
|
||||||
echo forcing reinstall
|
|
||||||
else
|
|
||||||
if [[ $BASH_SHELL_BASE ]] && [[ -d $BASH_SHELL_BASE ]]; then
|
if [[ $BASH_SHELL_BASE ]] && [[ -d $BASH_SHELL_BASE ]]; then
|
||||||
echo appears that UCI shell base is already installed at $BASH_SHELL_BASE
|
echo appears that UCI shell base is already installed at $BASH_SHELL_BASE
|
||||||
echo upgrade instead using: 'module_load uci-shell-install; update_shell_base'
|
echo upgrade instead using: 'module_load uci-shell-install; update_shell_base'
|
||||||
return 1
|
[[ $1 == "-f" ]] && { shift; echo forcing reinstall; } || return 1
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if [[ ! $BASH_SHELL_GIT_URL ]]; then
|
if [[ ! $BASH_SHELL_GIT_URL ]]; then
|
||||||
echo BASH_SHELL_GIT_URL must be set before install can proceed
|
echo BASH_SHELL_GIT_URL must be set before install can proceed
|
||||||
|
|
Loading…
Reference in New Issue