This commit is contained in:
Alan Maciel
2024-11-03 00:16:13 -06:00
parent edc9d685fc
commit c2f73c1f09

View File

@@ -1,47 +1,47 @@
CHOICES=( CHOICES=(
"Dev Language Install programming language environment" "Dev Language Install programming language environment"
"Dev Database Install development database in Docker" "Dev Database Install development database in Docker"
"1password Manage your passwords securely across devices" "1password Manage your passwords securely across devices"
"Audacity Record and edit audio" "Audacity Record and edit audio"
"Brave Chrome-based browser with built-in ad blocking" "Brave Chrome-based browser with built-in ad blocking"
"Cursor The AI Code Editor" "Cursor The AI Code Editor"
"Doom Emacs Emacs framework with curated list of packages" "Doom Emacs Emacs framework with curated list of packages"
"Dropbox Sync files across computers with ease" "Dropbox Sync files across computers with ease"
"OBS Studio Record screencasts with inputs from both display + webcam" "OBS Studio Record screencasts with inputs from both display + webcam"
"Ollama Run LLMs, like Meta's Llama3, locally" "Ollama Run LLMs, like Meta's Llama3, locally"
"RubyMine IntelliJ's commercial Ruby editor" "RubyMine IntelliJ's commercial Ruby editor"
"Spotify Stream music from the world's most popular service" "Spotify Stream music from the world's most popular service"
"Steam Play games from Valve's store" "Steam Play games from Valve's store"
"VirtualBox Virtual machines to run Windows/Linux" "VirtualBox Virtual machines to run Windows/Linux"
"Zed Fast all-purpose editor" "Zed Fast all-purpose editor"
"Zoom Attend and host video chat meetings" "Zoom Attend and host video chat meetings"
"> All Re-run any of the default installers" "> All Re-run any of the default installers"
"<< Back " "<< Back "
) )
CHOICE=$(gum choose "${CHOICES[@]}" --height 19 --header "Install application") CHOICE=$(gum choose "${CHOICES[@]}" --height 19 --header "Install application")
if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then
# Don't install anything # Don't install anything
echo "" echo ""
elif [[ "$CHOICE" == "> All"* ]]; then elif [[ "$CHOICE" == "> All"* ]]; then
INSTALLER_FILE=$(gum file $OMAKUB_PATH/install) INSTALLER_FILE=$(gum file $OMAKUB_PATH/install)
[[ -n "$INSTALLER_FILE" ]] && [[ -n "$INSTALLER_FILE" ]] &&
gum confirm "Run installer?" && gum confirm "Run installer?" &&
source $INSTALLER_FILE && source $INSTALLER_FILE &&
gum spin --spinner globe --title "Install completed!" -- sleep 3 gum spin --spinner globe --title "Install completed!" -- sleep 3
else else
INSTALLER=$(echo "$CHOICE" | awk -F ' {2,}' '{print $1}' | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g') INSTALLER=$(echo "$CHOICE" | awk -F ' {2,}' '{print $1}' | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')
case "$INSTALLER" in case "$INSTALLER" in
"dev-language") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-language.sh" ;; "dev-language") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-language.sh" ;;
"dev-database") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-storage.sh" ;; "dev-database") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-storage.sh" ;;
"ollama") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-ollama.sh" ;; "ollama") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-ollama.sh" ;;
*) INSTALLER_FILE="$OMAKUB_PATH/install/desktop/optional/app-$INSTALLER.sh" ;; *) INSTALLER_FILE="$OMAKUB_PATH/install/desktop/optional/app-$INSTALLER.sh" ;;
esac esac
source $INSTALLER_FILE && gum spin --spinner globe --title "Install completed!" -- sleep 3 source $INSTALLER_FILE && gum spin --spinner globe --title "Install completed!" -- sleep 3
fi fi
clear clear