Compare commits

...

2 Commits

Author SHA1 Message Date
David Kebler d497156be9 allow force install 2024-02-27 18:55:57 -08:00
David Kebler e538400018 update rootfs excludes
preserve environment when installing with sudo
2024-02-27 18:53:59 -08:00
4 changed files with 11 additions and 9 deletions

View File

@ -8,9 +8,9 @@ uci_bash_shell_install () {
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 [[ $EUID -ne 0 ]] && usesudo=sudo
$usesudo $SHELL $install_dir/scripts/copy-etc.sh $usesudo -m $SHELL $install_dir/scripts/copy-etc.sh
$usesudo $SHELL $install_dir/scripts/copy-root.sh $usesudo -m $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

1
load/alias/02-git Normal file
View File

@ -0,0 +1 @@
alias gitdis="git clean -df"

View File

@ -21,10 +21,10 @@
# must! be run as sudo # must! be run as sudo
install_shell_base () { install_shell_base () {
if [[ $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
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

View File

@ -73,10 +73,11 @@ touch $rfse
[[ $delete ]] && rm $rfse [[ $delete ]] && rm $rfse
cat <<EOF > $rfse cat <<EOF > $rfse
.[Tt]rash* .[Tt]rash*
tmp/ tmp/*
cache/ node_modules
log/ [Cc]ache/*
log[s]/ logs/*
log/*
lost+found lost+found
EOF EOF
if [[ $list ]];then if [[ $list ]];then