addet install option
This commit is contained in:
parent
739628676f
commit
783765ed65
1 changed files with 25 additions and 9 deletions
|
@ -47,14 +47,6 @@ check_root() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Menu options
|
||||
declare -a options=(
|
||||
"Sudo-Options"
|
||||
"neovim"
|
||||
"neovim-minimal"
|
||||
"Exit"
|
||||
)
|
||||
|
||||
# Function to print colored text
|
||||
print_color() {
|
||||
printf "%b%s%b\n" "$1" "$2" "$NC"
|
||||
|
@ -62,6 +54,7 @@ print_color() {
|
|||
|
||||
gitDir="$HOME/git/dotfiles"
|
||||
dotRemote="https://git.k4li.de/dotfiles"
|
||||
instRemote="https://git.k4li.de/scripts/sh/raw/branch/main/installs"
|
||||
|
||||
if [ ! -d "$gitDir" ]; then
|
||||
print_color "$RED" "=== git dir created - $gitDir ==="
|
||||
|
@ -132,6 +125,16 @@ nvimMinimalSetup() {
|
|||
sleep 2
|
||||
}
|
||||
|
||||
installStuff() {
|
||||
echo_info "I want to install.."
|
||||
read -r gitPackage </dev/tty
|
||||
|
||||
echo_note "Installing from $instRemote/$gitPackage"
|
||||
curl -fsSL "${instRemote}/${gitPackage}.sh" | sh
|
||||
|
||||
sleep 3
|
||||
}
|
||||
|
||||
sudoOptions() {
|
||||
if [[ -e /etc/sudoers ]]; then
|
||||
echo "Defaults pwfeedback" | $_sudo tee -a /etc/sudoers
|
||||
|
@ -142,6 +145,15 @@ sudoOptions() {
|
|||
sleep 3
|
||||
}
|
||||
|
||||
# Menu options
|
||||
declare -a options=(
|
||||
"Sudo-Options"
|
||||
"neovim"
|
||||
"neovim-minimal"
|
||||
"Install.."
|
||||
"Exit"
|
||||
)
|
||||
|
||||
# Main menu loop
|
||||
main_menu() {
|
||||
local selected=0
|
||||
|
@ -154,6 +166,9 @@ main_menu() {
|
|||
read -rsn1 key
|
||||
|
||||
case $key in
|
||||
q | Q)
|
||||
exit 0
|
||||
;;
|
||||
A | k) # Up arrow or k
|
||||
((selected--))
|
||||
if [[ $selected -lt 0 ]]; then
|
||||
|
@ -171,7 +186,8 @@ main_menu() {
|
|||
0) sudoOptions ;;
|
||||
1) nvimSetup ;;
|
||||
2) nvimMinimalSetup ;;
|
||||
3) exit 0 ;;
|
||||
3) installStuff ;;
|
||||
4) exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue